You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a job having some current attributes fails and is put into the retry queue, we can see that, when retrying it, the current attributes (cattr) are missing from the retried job payload.
I was expected to see the whole payload and thus the current attributes when retrying a job. Not sure if it's the desired behaviour.
Not sure if we should skip setting the cattr key here when already present or ensure that a retried job sets the CurrentAttributes before pushing back to the queue.
Ruby version: 2.7.5p203
Rails version: 6.1.4.1
Sidekiq / Pro / Enterprise version(s): sidekiq 6.3.1
When a job having some current attributes fails and is put into the retry queue, we can see that, when retrying it, the current attributes (
cattr
) are missing from the retried job payload.I was expected to see the whole payload and thus the current attributes when retrying a job. Not sure if it's the desired behaviour.
I think it's happening here:
https://github.com/mperham/sidekiq/blob/main/lib/sidekiq/middleware/current_attributes.rb#L23
when the server is pushing back the job from the retry queue to the processing queue, nothing sets the attributes of the Rails CurrentAttributes class (which is then empty) and so it overwrites the original
cattr
with an empty hash.Not sure if we should skip setting the
cattr
key here when already present or ensure that a retried job sets the CurrentAttributes before pushing back to the queue.Simple example :
initializer
lib/my_job.rb
The text was updated successfully, but these errors were encountered: