You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ruby foo.rb
F
Failures:
1) is expected to change `Resque.redis.hlen(Resque::DataStore::HEARTBEAT_KEY)` from 1 to 0
Failure/Error:
expect {
worker = Resque::Worker.new('*')
worker.prune_dead_workers
}.to change { Resque.redis.hlen(Resque::DataStore::HEARTBEAT_KEY) }.from(1).to(0)
expected `Resque.redis.hlen(Resque::DataStore::HEARTBEAT_KEY)` to have changed from 1 to 0, but did not change
# foo.rb:34:in `block (2 levels) in <main>'
Finished in 0.1311 seconds (files took 0.06291 seconds to load)
1 example, 1 failure
Failed examples:
rspec foo.rb:14 # is expected to change `Resque.redis.hlen(Resque::DataStore::HEARTBEAT_KEY)` from 1 to 0
The text was updated successfully, but these errors were encountered:
Currently,
Resque::DataStore::HEARTBEAT_KEY
and:workers
are registered independently.If a worker is killed in
resque/lib/resque/worker.rb
Lines 366 to 367 in be71bd1
Resque::DataStore::HEARTBEAT_KEY
is registered but:workers
isn't.Resque::Worker#prune_dead_workers
assumesWorker.all
contains such a worker but they're missed.resque/lib/resque/worker.rb
Line 602 in be71bd1
Here's an example to reproduce this problem:
The text was updated successfully, but these errors were encountered: