执行task时没有代入环境变量
This commit is contained in:
parent
28035dfc47
commit
ed2a3c976d
|
@ -1,12 +1,12 @@
|
||||||
namespace :importer do
|
namespace :importer do
|
||||||
task :importuser do
|
task :importuser => :environment do
|
||||||
ENV['CLASS']='User'
|
ENV['CLASS']='User'
|
||||||
ENV['SCOPE']='indexable'
|
ENV['SCOPE']='indexable'
|
||||||
ENV['FORCE']='y'
|
ENV['FORCE']='y'
|
||||||
ENV['BATCH']='1000'
|
ENV['BATCH']='1000'
|
||||||
Rake::Task["elasticsearch:import:model"].invoke
|
Rake::Task["elasticsearch:import:model"].invoke
|
||||||
end
|
end
|
||||||
task :importproject do
|
task :importproject => :environment do
|
||||||
|
|
||||||
ENV['CLASS']='Project'
|
ENV['CLASS']='Project'
|
||||||
ENV['SCOPE']='indexable'
|
ENV['SCOPE']='indexable'
|
||||||
|
@ -14,21 +14,21 @@ namespace :importer do
|
||||||
ENV['BATCH']='1000'
|
ENV['BATCH']='1000'
|
||||||
Rake::Task["elasticsearch:import:model"].invoke
|
Rake::Task["elasticsearch:import:model"].invoke
|
||||||
end
|
end
|
||||||
task :importcourse do
|
task :importcourse => :environment do
|
||||||
ENV['CLASS']='Course'
|
ENV['CLASS']='Course'
|
||||||
ENV['SCOPE']='indexable'
|
ENV['SCOPE']='indexable'
|
||||||
ENV['FORCE']='y'
|
ENV['FORCE']='y'
|
||||||
ENV['BATCH']='1000'
|
ENV['BATCH']='1000'
|
||||||
Rake::Task["elasticsearch:import:model"].invoke
|
Rake::Task["elasticsearch:import:model"].invoke
|
||||||
end
|
end
|
||||||
task :importattachment do
|
task :importattachment => :environment do
|
||||||
ENV['CLASS']='Attachment'
|
ENV['CLASS']='Attachment'
|
||||||
ENV['SCOPE']='indexable'
|
ENV['SCOPE']='indexable'
|
||||||
ENV['FORCE']='y'
|
ENV['FORCE']='y'
|
||||||
ENV['BATCH']='1000'
|
ENV['BATCH']='1000'
|
||||||
Rake::Task["elasticsearch:import:model"].invoke
|
Rake::Task["elasticsearch:import:model"].invoke
|
||||||
end
|
end
|
||||||
task :importmemo do
|
task :importmemo => :environment do
|
||||||
ENV['CLASS']='Memo'
|
ENV['CLASS']='Memo'
|
||||||
ENV['SCOPE']='indexable'
|
ENV['SCOPE']='indexable'
|
||||||
ENV['FORCE']='y'
|
ENV['FORCE']='y'
|
||||||
|
|
Loading…
Reference in New Issue