From 1fe141175c14119672cc5708954ab15e05a9f9bd Mon Sep 17 00:00:00 2001 From: Benjamin Meichsner Date: Mon, 7 Jan 2013 13:44:46 +0100 Subject: [PATCH] Fixed multicoops and resque rake tasks. --- lib/tasks/multicoops.rake | 6 +++--- lib/tasks/resque.rake | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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