class Sidekiq::ProcessSet

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

Defined in:

sidekiq/api.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(clean_plz = true) #

[View source]

Class Method Detail

def self.cleanup #

Cleans up dead processes recorded in Redis. Returns the number of processes cleaned.


[View source]

Instance Method Detail

def each(&) #
Description copied from module Enumerable(Sidekiq::Process)

Must yield this collection's elements to the block.


[View source]
def size #

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.


[View source]