-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Sidekiq Web: TypeError - can't convert String into an exact number #1949
Comments
I take this one |
Are you pushing jobs into Redis manually? This might be the behavior you see if you push |
No I'm not pushing jobs into Redis manually there, it seems to only happens on jobs that have a retry count > 1 so maybe the @seuros thanks for the quick fix! |
Are you using any Sidekiq extensions/add-ons? I ask because no one else has reported this problem and I just verified this code hasn't changed for months. |
The only extension I can think of is librato-sidekiq. And nothing about |
I don't have a good solution for this. Somehow bad data got into Redis and broke bits of Sidekiq. That's expected behavior: garbage in, garbage out. The culprit is not in Sidekiq itself afaict so closing with no resolution. |
I just ran into this same thing with Sidekiq Pro 1.8.0. It happened after I enqueued an ActiveJob with the wrong arguments. > Sidekiq::RetrySet.new.to_a.first.item['enqueued_at']
=> "1413828297.145691"
> Sidekiq::RetrySet.new.to_a.first.item['retried_at']
=> 1413828689.05288 |
I can reproduce this just by running this: Sidekiq::Client.push 'class' => ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper, 'args' => [] This enqueues the job with a proper BigDecimal 'enqueued_at', but after Sidekiq has processed the job and sends it to the retry queue, 'enqueued_at' becomes a string. |
I finally figured out the problem - we're using the oj_mimic_json gem (which overrides the JSON module with Oj), and that behavior was not consistent with regular JSON for large float values: > JSON.parse(JSON.generate(foo: 123456789012.4567))
=> {"foo"=>#<BigDecimal:7f1cac4cb6c8,'0.1234567890 124567E12',27(27)>}
> JSON.generate(JSON.parse(JSON.generate(foo: 123456789012.4567)))
=> "{\"foo\":\"123456789012.4567\"}" Upgrading the oj gem fixes it, presumably because of this commit: ohler55/oj@98a295e9236a |
@aripollak Thanks for that one! |
@mperham I am seeing this too on
This happens when I try to click on a retry - eg:
|
@kapso Do not resurrect old issues. Open your own new issue. |
I got this issue when I try to access a specific retry job
/retries/1410861402.471819-48b24ff19fc4402baa79f87e
:The text was updated successfully, but these errors were encountered: