-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert 'retry' to string for ES compatibility #5
Convert 'retry' to string for ES compatibility #5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix is appreciated
@iMacTia please check |
Hi @matus-vacula, |
Hi @iMacTia, as mentioned in https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/job_retry.rb#L26 it can contain an integer too. |
I see, that makes sense then. if payload['retry'].is_a?(Integer)
payload['max_retries'] = payload['retry']
payload['retry'] = true
end This way backwards compatibility should be preserved. |
Works for me. |
@iMacTia updated |
Thanks @matus-vacula, looks good to me, I'd just like another maintainer to have a look as I'm not currently using this in production, but they are. |
I stumbled upon another case where delivery to ES was broken. |
This reverts commit 3453ec7.
@matus-vacula I think If that's the case, then probably all fields injected by that gem are currently not supported. Support for |
This reverts commit 1245be1.
sure, no problem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, if good for @silviusimeria as well we can merge it 👍
@iMacTia sorry, I have just noticed this, I will have a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
'retry' field can contain not just integer but also false. This breaks ES compatibility.
The error I'm currently getting: