Sha256: 70b7ccd860c8ab3eee0bc3baf6ad21180cf3d1960f8d45c1d0dbddba1e567662
Contents?: true
Size: 448 Bytes
Versions: 8
Compression:
Stored size: 448 Bytes
Contents
module Sidetiq class Middleware def initialize @clock = Sidetiq::Clock.instance end def call(*args) # Restart the clock if the thread died. if !@clock.ticking? Sidetiq.logger.warn "Sidetiq::Clock thread died. Restarting..." @clock.start! end yield end end end Sidekiq.configure_server do |config| config.server_middleware do |chain| chain.add Sidetiq::Middleware end end
Version data entries
8 entries across 8 versions & 1 rubygems