Upgrade to 7.0 and scheduled jobs. #5824
-
|
Hi! I'm preparing to upgrade my app to Sidekiq 7.0, and getting rid of all deprecation warnings. I have some jobs, that right now have symbols passed to them, and I'm changing that. The question is, what about jobs that are scheduled far in the future? For example I have jobs scheduled for 2 months from now where arguments were symbols. Inside that job, code doesn't care if it comes as a symbol or as a string. Will this result in some sort of error if I upgrade do sidekiq 7.0 in the meantime, for example in a month? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Unfortunately this type of code change is equivalent to a migration: you have persistent data in an old format. You'll either need to migrate the data (not easy) or support both old and new formats for a time (recommended) until the old jobs have been consumed. You won't get an error because Sidekiq checks the args and raises the error when creating the job. These old jobs have already been created, just not executed. |
Beta Was this translation helpful? Give feedback.
Unfortunately this type of code change is equivalent to a migration: you have persistent data in an old format. You'll either need to migrate the data (not easy) or support both old and new formats for a time (recommended) until the old jobs have been consumed.
You won't get an error because Sidekiq checks the args and raises the error when creating the job. These old jobs have already been created, just not executed.