执行task时没有代入环境变量

This commit is contained in:
guange 2016-02-02 16:25:26 +08:00
parent 28035dfc47
commit ed2a3c976d
1 changed files with 5 additions and 5 deletions

View File

@ -1,12 +1,12 @@
namespace :importer do
task :importuser do
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 do
task :importproject => :environment do
ENV['CLASS']='Project'
ENV['SCOPE']='indexable'
@ -14,21 +14,21 @@ namespace :importer do
ENV['BATCH']='1000'
Rake::Task["elasticsearch:import:model"].invoke
end
task :importcourse do
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 do
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 do
task :importmemo => :environment do
ENV['CLASS']='Memo'
ENV['SCOPE']='indexable'
ENV['FORCE']='y'