socialforge/lib/tasks/elasticsearch_batch_op.rake

38 lines
939 B
Ruby
Raw Normal View History

2015-11-27 14:42:25 +08:00
namespace :importer do
task :importuser do
ENV['CLASS']='User'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
task :importproject do
ENV['CLASS']='Project'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
task :importcourse do
ENV['CLASS']='Course'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
task :importattachment do
ENV['CLASS']='Attachment'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
2015-12-07 14:31:05 +08:00
task :importmemo do
ENV['CLASS']='Memo'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
2015-11-27 14:42:25 +08:00
end