class SidekiqUniqueJobs::Orphans::Reaper
@author Mikael Henriksson <mikael@mhenrixon.com>
@note this is a much slower version of the lua script but does not crash redis
Class DeleteOrphans provides deletion of orphaned digests
def self.call(conn = nil)
-
(void)
-
Parameters:
-
conn
(Redis
) -- nil a connection to redis
def self.call(conn = nil) return new(conn).call if conn redis { |rcon| new(rcon).call } end
def call
-
(Integer)
- the number of reaped locks
def call if (implementation = REAPERS[reaper]) implementation.new(conn).call else log_fatal(":#{reaper} is invalid for `SidekiqUnqiueJobs.config.reaper`") end end
def config
-
(SidekiqUniqueJobs::Config)
-
def config SidekiqUniqueJobs.config end
def initialize(conn)
-
conn
(Redis
) -- a connection to redis
def initialize(conn) @conn = conn end
def reaper
-
(Symbol)
-
def reaper config.reaper end
def reaper_count
-
(Integer)
-
def reaper_count config.reaper_count end