Search code examples
ruby-on-railsubuntudaemonsidekiq

Rails : How to stop background job of daemonized sidekiq in Ubuntu


I did this command:

bundle exec sidekiq -d -L sidekiq-logfile

Now sidekiq can successfully run jobs asynchronously and working perfectly alright, but the thing is how do I stop it? It has been daemonized.

Should I use ubuntu native commands like kill or something, or sidekiq provides some way to do this from the panel like http://localhost:3000/sidekiq ?


Solution

  • There is sidekiqctl https://github.com/mperham/sidekiq/wiki/Signals#sidekiqctl.

    So you need something like: bundle exec sidekiqctl stop [pidfile]

    Of course you can use and kill, as well.