-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
incompatibility with sidekiq-failures #790
Comments
Will happily craft a PR if you tell me in which direction you would like a solution to be done. |
This is indeed unfortunate, I am guessing it would be better to add sidekiq-unique-jobs last to ensure the safe relative time helper is from this gem (since sometimes the timestamp can be nil). Apart from that, I have no good ideas at the moment. |
I guess one way would be to somewhat namespace the helper function ( |
This issue will be resolved by PR-152. But I don't know when it be released |
Describe the bug
Sorry for cross-posting mhfs/sidekiq-failures#148 - I am not sure what the best way would be.
Update/TL;DR This might be due to #761 (comment) , where timestamps can be nil. However, the situation is still unlucky and could re-occur, since both gems define a global helper with the same name.
sidekiq_unique_jobs
has a Locks Web UI in which current locks are rendered. The page also shows when the lock was created, in asafe_relative_time
.sidekiq-failures
also implements asafe_relative_times
.See
sidekiq-unique-jobs/lib/sidekiq_unique_jobs/web/helpers.rb
Line 148 in f381562
and
https://github.com/mhfs/sidekiq-failures/blob/2b30cb1c87ce09cfb1758f90cc720ddf50dcb591/lib/sidekiq/failures/web_extension.rb#L9
However, the implementation in sidekiq_unique_jobs seems to be more robust (surviving
nil
because of atime.to_s
inparse_time
), resulting inNow, I am not 100% sure why we have
nil
s here (there is always one weird lock without a timestamp, like here: #761 (comment)), but if I removesidekiq-failures
from the bundle, everything runs fine.Expected behavior
Time rendered just fine.
Current behavior
See screenshot above, there is a conversion error because a nil timestamp is passed on to the
safe_relative_time
implementation of sidekiq-failures.The text was updated successfully, but these errors were encountered: