Sha256: cb5f9886cf0585c1b6a8fa9a5d0b1b1a4bbc0dd864fc2043eea76f37491b0eda

Contents?: true

Size: 723 Bytes

Versions: 16

Compression:

Stored size: 723 Bytes

Contents

module Sidetiq
  class << self
    # Public: Sets the configuration used by Sidetiq.
    attr_writer :config

    # Public: Configuration wrapper for block configurations.
    #
    # Examples
    #
    #   Sidetiq.configure do |config|
    #     config.resolution = 0.2
    #   end
    #
    # Yields the configuration OpenStruct currently set.
    # Returns nothing.
    def configure
      yield config
    end

    # Public: Returns the current configuration used by Sidetiq.
    def config
      @config ||= OpenStruct.new
    end
  end

  configure do |config|
    config.worker_history = 50
    config.resolution = 1
    config.lock_expire = 1000
    config.utc = false
    config.handler_pool_size = nil
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sidetiq-0.7.2 lib/sidetiq/config.rb
sidetiq-0.7.1 lib/sidetiq/config.rb
sidetiq-0.7.0 lib/sidetiq/config.rb
sidetiq-0.6.3 lib/sidetiq/config.rb
sidetiq-0.6.2 lib/sidetiq/config.rb
sidetiq-0.6.1 lib/sidetiq/config.rb
sidetiq-0.6.0 lib/sidetiq/config.rb
sidetiq-0.5.0 lib/sidetiq/config.rb
sidetiq-0.4.3 lib/sidetiq/config.rb
sidetiq-0.4.2 lib/sidetiq/config.rb
sidetiq-0.4.1 lib/sidetiq/config.rb
sidetiq-0.4.0 lib/sidetiq/config.rb
sidetiq-0.4.0.rc4 lib/sidetiq/config.rb
sidetiq-0.4.0.rc3 lib/sidetiq/config.rb
sidetiq-0.4.0.rc2 lib/sidetiq/config.rb
sidetiq-0.4.0.rc1 lib/sidetiq/config.rb