resque / resque/resque

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

Open
#1,789 2 comments 3 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.