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

This commit is contained in:
guange 2016-02-02 16:33:08 +08:00
parent ed2a3c976d
commit 609d98f8a3
1 changed files with 7 additions and 0 deletions

View File

@ -1,4 +1,11 @@
namespace :importer do 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 task :importuser => :environment do
ENV['CLASS']='User' ENV['CLASS']='User'
ENV['SCOPE']='indexable' ENV['SCOPE']='indexable'