From 49e70ea37aa80a8104ea56693983910c7619af34 Mon Sep 17 00:00:00 2001 From: Zach Baker Date: Mon, 6 Jul 2015 14:34:29 -0700 Subject: [PATCH] Remove "nohup" from rake task to address #101 The interaction between this gem and capistrano-rbenv causes problems in this configuration. Removing "nohup" is a workaround. See https://github.com/sshingler/capistrano-resque/issues/101 for why this is so. --- lib/capistrano-resque/tasks/capistrano-resque.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/capistrano-resque/tasks/capistrano-resque.rake b/lib/capistrano-resque/tasks/capistrano-resque.rake index b1f6490..1b74ec5 100644 --- a/lib/capistrano-resque/tasks/capistrano-resque.rake +++ b/lib/capistrano-resque/tasks/capistrano-resque.rake @@ -70,7 +70,7 @@ namespace :resque do number_of_workers.times do pid = "#{fetch(:resque_pid_path)}/resque_work_#{worker_id}.pid" within current_path do - execute :nohup, %{#{SSHKit.config.command_map[:rake]} RACK_ENV=#{rails_env} RAILS_ENV=#{rails_env} QUEUE="#{queue}" PIDFILE=#{pid} BACKGROUND=yes #{"VERBOSE=1 " if fetch(:resque_verbose)}INTERVAL=#{fetch(:interval)} #{"environment " if fetch(:resque_environment_task)}resque:work #{output_redirection}} + execute %{#{SSHKit.config.command_map[:rake]} RACK_ENV=#{rails_env} RAILS_ENV=#{rails_env} QUEUE="#{queue}" PIDFILE=#{pid} BACKGROUND=yes #{"VERBOSE=1 " if fetch(:resque_verbose)}INTERVAL=#{fetch(:interval)} #{"environment " if fetch(:resque_environment_task)}resque:work #{output_redirection}} end worker_id += 1 end @@ -130,7 +130,7 @@ namespace :resque do create_pid_path pid = "#{fetch(:resque_pid_path)}/scheduler.pid" within current_path do - execute :nohup, %{#{SSHKit.config.command_map[:rake]} RACK_ENV=#{rails_env} RAILS_ENV=#{rails_env} PIDFILE=#{pid} BACKGROUND=yes #{"VERBOSE=1 " if fetch(:resque_verbose)}MUTE=1 #{"DYNAMIC_SCHEDULE=yes " if fetch(:resque_dynamic_schedule)}#{"environment " if fetch(:resque_environment_task)}resque:scheduler #{output_redirection}} + execute %{#{SSHKit.config.command_map[:rake]} RACK_ENV=#{rails_env} RAILS_ENV=#{rails_env} PIDFILE=#{pid} BACKGROUND=yes #{"VERBOSE=1 " if fetch(:resque_verbose)}MUTE=1 #{"DYNAMIC_SCHEDULE=yes " if fetch(:resque_dynamic_schedule)}#{"environment " if fetch(:resque_environment_task)}resque:scheduler #{output_redirection}} end end end