Search code examples
ruby-on-rails-3sidekiq

Sidekiq : how to restart sidekiq when deploying project to server?


Here is my restart script for sidekiq def restart process_list.each do |p| process_stop p process_start p end end

when i am deploying code to production then this script executes and restarts every process.

But now I want to restart sidekiq as running process shouldn't be affected.

In my case : I am sending mails using sidekiq. for example i am sending 100000 mails and this process is executing. If I am deploying this time. then many mails have already triggered and after restarting they will trigger again.

How can I fix this issue?

Thanks


Solution

  • Each mail should be a separate job.