Skip to content
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

TypeError: can't convert Redis::Future into an exact number #1789

Open
jcoyne opened this issue Feb 9, 2022 · 2 comments
Open

TypeError: can't convert Redis::Future into an exact number #1789

jcoyne opened this issue Feb 9, 2022 · 2 comments

Comments

@jcoyne
Copy link

jcoyne commented Feb 9, 2022

When using ActiveSupport 7.0.1 with resque, a type error is raised:

TypeError: can't convert Redis::Future into an exact number
Original Exception (TypeError): can't convert Redis::Future into an exact number
  /opt/app/lyberadmin/common-accessioning/shared/bundle/ruby/3.0.0/gems/activesupport-7.0.1/lib/active_support/core_ext/time/calculations.rb:56:in `at'  
/opt/app/lyberadmin/common-accessioning/shared/bundle/ruby/3.0.0/gems/activesupport-7.0.1/lib/active_support/core_ext/time/calculations.rb:56:in `at_with_coercion'  
/opt/app/lyberadmin/common-accessioning/shared/bundle/ruby/3.0.0/gems/resque-2.2.0/lib/resque/data_store.rb:95:in `server_time'  
/opt/app/lyberadmin/common-accessioning/shared/bundle/ruby/3.0.0/gems/resque-2.2.0/lib/resque/worker.rb:483:in `heartbeat!'  
/opt/app/lyberadmin/common-accessioning/shared/bundle/ruby/3.0.0/gems/resque-2.2.0/lib/resque/worker.rb:520:in `block (2 levels) in start_heartbeat'  
/opt/app/lyberadmin/common-accessioning/shared/bundle/ruby/3.0.0/gems/resque-2.2.0/lib/resque/worker.rb:519:in `loop'  
/opt/app/lyberadmin/common-accessioning/shared/bundle/ruby/3.0.0/gems/resque-2.2.0/lib/resque/worker.rb:519:in `block in start_heartbeat'
@vhazbun
Copy link

vhazbun commented Aug 24, 2022

Same error here, resque v2.0.0 & ActiveSupport 6.1.5.1

can't convert Redis::Future into an exact number Original Exception (TypeError): can't convert Redis::Future into an exact number /srv/xxx/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.5.1/lib/active_support/core_ext/time/calculations.rb:56:in at' /srv/xxx/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.5.1/lib/active_support/core_ext/time/calculations.rb:56:in at_with_coercion' /srv/xxx/vendor/bundle/ruby/2.6.0/gems/resque-2.0.0/lib/resque/data_store.rb:94:in server_time' /srv/xxx/vendor/bundle/ruby/2.6.0/gems/resque-2.0.0/lib/resque/worker.rb:478:in heartbeat!' /srv/xxx/vendor/bundle/ruby/2.6.0/gems/resque-2.0.0/lib/resque/worker.rb:513:in block (2 levels) in start_heartbeat' /srv/xxx/vendor/bundle/ruby/2.6.0/gems/resque-2.0.0/lib/resque/worker.rb:512:in loop' /srv/xxx/vendor/bundle/ruby/2.6.0/gems/resque-2.0.0/lib/resque/worker.rb:512:in `block in start_heartbeat'

@andriy-baran
Copy link

Check the output

Resque.redis.time

it should be an array with two numbers. In my case it was nil because of broken configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants