diff --git a/lib/tasks/multicoops.rake b/lib/tasks/multicoops.rake index 1f0b845d..ccd16f6f 100644 --- a/lib/tasks/multicoops.rake +++ b/lib/tasks/multicoops.rake @@ -5,7 +5,7 @@ namespace :multicoops do task_to_run = ARGV[1] FoodsoftConfig.each_coop do |coop| puts "Run '#{task_to_run}' for #{coop}" - Rake::Task[task_to_run].invoke + Rake::Task[task_to_run].execute end end @@ -14,7 +14,7 @@ namespace :multicoops do task_to_run = ARGV[1] FoodsoftConfig.select_foodcoop ENV['FOODCOOP'] puts "Run '#{task_to_run}' for #{ENV['FOODCOOP']}" - Rake::Task[task_to_run].invoke + Rake::Task[task_to_run].execute end -end \ No newline at end of file +end diff --git a/lib/tasks/resque.rake b/lib/tasks/resque.rake index bf577602..40c2b93c 100644 --- a/lib/tasks/resque.rake +++ b/lib/tasks/resque.rake @@ -8,7 +8,7 @@ def run_worker(queue, count = 1) count.times { ## Using Kernel.spawn and Process.detach because regular system() call would ## cause the processes to quit when capistrano finishes - pid = spawn(env_vars, "rake resque:work", ops) + pid = spawn(env_vars, "bundle exec rake resque:work", ops) Process.detach(pid) } end