Sha256: f65d35e6558a81a73dece6b705d4976b86bd5c4894a4b5061b01947115345d19

Contents?: true

Size: 700 Bytes

Versions: 1

Compression:

Stored size: 700 Bytes

Contents

require 'logger'
require_relative 'backgrounded/handler/inprocess_handler'
require_relative 'backgrounded/object_extensions'
require_relative 'backgrounded/railtie' if defined?(Rails)

module Backgrounded
  class << self
    attr_accessor :logger, :handler

    def configure
      yield configuration
    end

    def configuration
      self
    end
  end
end

# default library configuration
Backgrounded.configure do |config|
  # default handler to the basic in process handler
  config.handler = Backgrounded::Handler::InprocessHandler.new

  # configure default logger to standard out with info log level
  logger = Logger.new(STDOUT)
  logger.level = Logger::INFO
  config.logger = logger
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
backgrounded-2.1.1 lib/backgrounded.rb