TypeError: can't convert Redis::Future into an exact number
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'
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'
Check the output
Resque.redis.time
it should be an array with two numbers. In my case it was nil because of broken configuration