Sha256: 276391adce1328b07a2c93070cf2ff8505b2881d9d7d15241d7570c42d3e9eb8

Contents?: true

Size: 815 Bytes

Versions: 3

Compression:

Stored size: 815 Bytes

Contents

# frozen_string_literal: true

require 'resque'
require 'emittance'

require 'emittance/resque/version'
require 'emittance/resque/errors'

require 'emittance/resque/broker'
require 'emittance/resque/dispatcher'

module Emittance
  ##
  # Top-level namespace for the Resque emittance broker.
  #
  module Resque
    class << self
      def use_serializer(serializer)
        Emittance::Resque::EventSerializer.use_serializer serializer
      end
    end
  end
end

# :nocov:
Emittance::Brokerage.register_broker Emittance::Resque::Broker, :resque

if defined?(ActiveRecord)
  require 'emittance/resque/event_serializer/active_record'
  Emittance::Resque.use_serializer Emittance::Resque::EventSerializer::ActiveRecord
else
  Emittance::Resque.use_serializer Emittance::Resque::EventSerializer::Default
end
# :nocov:

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
emittance-resque-0.2.0 lib/emittance/resque.rb
emittance-resque-0.1.1 lib/emittance/resque.rb
emittance-resque-0.1.0 lib/emittance/resque.rb