Skip to content

Commit

Permalink
Remove "nohup" from rake task to address 9z0b3t1c#101
Browse files Browse the repository at this point in the history
The interaction between this gem and capistrano-rbenv causes problems in this configuration. Removing "nohup" is a workaround. See 9z0b3t1c#101 for why this is so.
  • Loading branch information
zach committed Jul 6, 2015
1 parent 83d66bf commit 49e70ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/capistrano-resque/tasks/capistrano-resque.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 49e70ea

Please sign in to comment.