TypeError: can't convert Redis::Future into an exact number
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 9.5k
- Forks
- 1.7k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 25
Description
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'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported stack trace at ActiveSupport's time calculations and Resque's data_store.rb server_time, then reproduce the failure using ActiveSupport 7.0.1 and resque 2.2.0. Done means the worker heartbeat no longer raises a TypeError when Redis returns a Redis::Future.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- redis, ruby
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100