You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trustieforge/lib/tasks/elasticsearch_batch_op.rake

45 lines
1.3 KiB

namespace :importer do
task :import_all => :environment do
Rake::Task["importer:importuser"].execute
Rake::Task["importer:importproject"].execute
Rake::Task["importer:importcourse"].execute
Rake::Task["importer:importattachment"].execute
Rake::Task["importer:importmemo"].execute
end
task :importuser => :environment do
ENV['CLASS']='User'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
task :importproject => :environment do
ENV['CLASS']='Project'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
task :importcourse => :environment do
ENV['CLASS']='Course'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
task :importattachment => :environment do
ENV['CLASS']='Attachment'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
task :importmemo => :environment do
ENV['CLASS']='Memo'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
end