1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Add script to clean up lingering processes

This commit is contained in:
Mike Perham 2016-06-01 08:49:03 -07:00
parent 776e69d631
commit b6d9db382c

View file

@ -5,6 +5,20 @@ HEAD
- Fixed race condition in heartbeat which could rarely lead to lingering
processes on the Busy tab. [#2982]
```ruby
# to clean up lingering processes, modify this as necessary to connect to your Redis.
# after 60 seconds, lingering processes should disappear from the Busy page.
require 'redis'
r = Redis.new(url: "redis://localhost:6379/0")
# uncomment if you need a namespace
#require 'redis-namespace'
#r = Redis::Namespace.new("foo", r)
r.smembers("processes").each do |pro|
r.expire(pro, 60)
r.expire("#{pro}:workers", 60)
end
```
4.1.2