Skip to content

Commit 40cd0a0

Browse files
committed
Bugfix: Workers may not be clearing their state correctly on shutdown
1 parent 8fb7daf commit 40cd0a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/resque/worker.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ def run_hook(name, *args)
322322
# Unregisters ourself as a worker. Useful when shutting down.
323323
def unregister_worker
324324
redis.srem(:workers, self)
325+
redis.del("worker:#{self}")
325326
redis.del("worker:#{self}:started")
326327

327328
Stat.clear("processed:#{self}")

0 commit comments

Comments
 (0)