Sha256: f59c2e0b7954dc0238255a037775bec8bf66d4eef5d7f73906f683eb4b2241f8
Contents?: true
Size: 442 Bytes
Versions: 7
Compression:
Stored size: 442 Bytes
Contents
module Resqutils # Vends stale workers that have been running "too long" class StaleWorkersKiller def self.perform self.new.kill_stale_workers end def initialize(options={}) @stale_workers = options.fetch(:stale_workers, Resqutils::StaleWorkers.new) end def kill_stale_workers @stale_workers.each do |worker| Resque.enqueue(Resqutils::WorkerKillerJob,worker.id) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems