Class: Sidetiq::Actor::Clock

Inherits:
Clock
  • Object
show all
Includes:
Sidekiq::ExceptionHandler, Sidetiq::Actor
Defined in:
lib/sidetiq/actor/clock.rb

Instance Attribute Summary

Attributes inherited from Clock

#schedules

Instance Method Summary collapse

Methods included from Sidetiq::Actor

included

Methods inherited from Clock

#gettime, #schedule_for, #start!, start!, #tick

Constructor Details

#initialize(*args, &block) ⇒ Clock

Returns a new instance of Clock.



7
8
9
10
11
12
13
14
15
16
# File 'lib/sidetiq/actor/clock.rb', line 7

def initialize(*args, &block)
  super

  if Sidekiq.server?
    after(0) do
      debug "Sidetiq::Clock looping ..."
      loop!
    end
  end
end