Can I rename a Sidekiq worker and deploy it in one step without worrying about jobs getting orphaned looking for the previous name? Or do I need to do a 2-step deploy to make sure the original jobs have drained from the queue before deleting the original worker?
For example, if I wanted to rename EmailSignupWorker
to EmailRegistrationWorker
, do I neeed to:
- Create a new
EmailRegistrationWorker
with the same contents asEmailSignupWorker
and use that new worker for all instances whereEmailSignupWorker
was being used. - Deploy.
- Wait for any
EmailSignupWorker
jobs to drain. - Delete
EmailSignupWorker
. - Deploy.