class Sidekiq::ProcessSet
- Sidekiq::ProcessSet
- Reference
- Object
Overview
Enumerates the set of Sidekiq processes which are actively working right now. Each process send a heartbeat to Redis every 5 seconds so this set should be relatively accurate, barring network partitions.
Yields a Sidekiq::Process.
Included Modules
- Enumerable(Sidekiq::Process)
Defined in:
sidekiq/api.crConstructors
Class Method Summary
-
.cleanup
Cleans up dead processes recorded in Redis.
Instance Method Summary
-
#each(&)
Must yield this collection's elements to the block.
-
#size
This method is not guaranteed accurate since it does not prune the set based on current heartbeat.
Constructor Detail
Class Method Detail
Cleans up dead processes recorded in Redis. Returns the number of processes cleaned.
Instance Method Detail
Must yield this collection's elements to the block.
This method is not guaranteed accurate since it does not prune the set based on current heartbeat. #each does that and ensures the set only contains Sidekiq processes which have sent a heartbeat within the last 60 seconds.