Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fix Sidekiq :start Capistrano recipe to work as a background task

  • Loading branch information...
commit a57b09c9f568b7a3dfbec71ee0ee048d65602cc5 1 parent 2456edd
@sush authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/sidekiq/capistrano.rb
2  lib/sidekiq/capistrano.rb
@@ -16,7 +16,7 @@
desc "Start sidekiq"
task :start do
rails_env = fetch(:rails_env, "production")
- run "cd #{current_path} && bundle exec sidekiq -e #{rails_env} -C config/sidekiq.yml -P tmp/pids/ >> log/sidekiq.log &"
+ run "cd #{current_path} && nohup bundle exec sidekiq -e #{rails_env} -C config/sidekiq.yml -P tmp/pids/ >> log/sidekiq.log < /dev/null 2>&1 & sleep 1"
desc "Restart sidekiq"

2 comments on commit a57b09c


I think you mean to do this to redirect both stdout and stderr. You don't want to redirect them to /dev/null or you will never see any errors or logging output.

&>> log.sidekiq.log

< /dev/null sets Sidekiq's STDIN to /dev/null.

Also, what is the purpose of the sleep 1?


Yes my bad, I didn't explain it well :)

About the sleep 1 I don't really know why but without it does not work.

Please sign in to comment.
Something went wrong with that request. Please try again.