Module: Sidetiq

Extended by:
Sidetiq
Includes:
API
Included in:
Sidetiq
Defined in:
lib/sidetiq.rb,
lib/sidetiq/api.rb,
lib/sidetiq/web.rb,
lib/sidetiq/actor.rb,
lib/sidetiq/clock.rb,
lib/sidetiq/config.rb,
lib/sidetiq/handler.rb,
lib/sidetiq/logging.rb,
lib/sidetiq/version.rb,
lib/sidetiq/schedule.rb,
lib/sidetiq/lock/redis.rb,
lib/sidetiq/supervisor.rb,
lib/sidetiq/actor/clock.rb,
lib/sidetiq/schedulable.rb,
lib/sidetiq/actor/handler.rb,
lib/sidetiq/lock/meta_data.rb,
lib/sidetiq/subclass_tracking.rb,
lib/sidetiq/middleware/history.rb

Overview

The Sidetiq namespace.

Defined Under Namespace

Modules: API, Actor, Lock, Logging, Middleware, Schedulable, SubclassTracking, VERSION, Web Classes: Clock, Handler, Schedule, Supervisor

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from API

#retries, #scheduled, #schedules, #workers

Class Attribute Details

.configObject

Public: Returns the current configuration used by Sidetiq.


21
22
23
# File 'lib/sidetiq/config.rb', line 21

def config
  @config ||= OpenStruct.new
end

.logger=(value) ⇒ Object (writeonly)

Public: Setter for the Sidetiq logger.


43
44
45
# File 'lib/sidetiq.rb', line 43

def logger=(value)
  @logger = value
end

Class Method Details

.configure {|config| ... } ⇒ Object

Public: Configuration wrapper for block configurations.

Examples

Sidetiq.configure do |config|
  config.resolution = 0.2
end

Yields the configuration OpenStruct currently set. Returns nothing.

Yields:


16
17
18
# File 'lib/sidetiq/config.rb', line 16

def configure
  yield config
end

Instance Method Details

#clockObject

Public: Returns the Sidetiq::Clock actor.


54
55
56
# File 'lib/sidetiq.rb', line 54

def clock
  Sidetiq::Supervisor.clock
end

#handlerObject

Public: Returns a Sidetiq::Handler worker.


59
60
61
# File 'lib/sidetiq.rb', line 59

def handler
  Sidetiq::Supervisor.handler
end

#loggerObject

Public: Reader for the Sidetiq logger.

Defaults to `Sidekiq.logger`.


49
50
51
# File 'lib/sidetiq.rb', line 49

def logger
  @logger ||= Sidekiq.logger
end