Sha256: 927c954184c263d4a760322b521a2d7dd1ac061c128cdaea69d0ae627f612b73

Contents?: true

Size: 1.13 KB

Versions: 14

Compression:

Stored size: 1.13 KB

Contents

require 'ddtrace/contrib/integration'
require 'ddtrace/contrib/resque/configuration/settings'
require 'ddtrace/contrib/resque/patcher'

module Datadog
  module Contrib
    module Resque
      # Description of Resque integration
      class Integration
        include Contrib::Integration

        MINIMUM_VERSION = Gem::Version.new('1.0')
        # Maximum is first version it's NOT compatible with (not inclusive)
        MAXIMUM_VERSION = Gem::Version.new('2.0')

        register_as :resque, auto_patch: true

        def self.version
          Gem.loaded_specs['resque'] && Gem.loaded_specs['resque'].version
        end

        def self.loaded?
          !defined?(::Resque).nil?
        end

        def self.compatible?
          super \
            && version >= Gem::Version.new('1.0') \
            && version < MAXIMUM_VERSION
        end

        def default_configuration
          Configuration::Settings.new
        end

        def patcher
          Patcher
        end

        class << self
          # Globally-acccesible reference for pre-forking optimization
          attr_accessor :sync_writer
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
ddtrace-0.41.0 lib/ddtrace/contrib/resque/integration.rb
ls-trace-0.2.0 lib/ddtrace/contrib/resque/integration.rb
ddtrace-0.40.0 lib/ddtrace/contrib/resque/integration.rb
ddtrace-0.39.0 lib/ddtrace/contrib/resque/integration.rb
ddtrace-0.38.0 lib/ddtrace/contrib/resque/integration.rb
ddtrace-0.37.0 lib/ddtrace/contrib/resque/integration.rb
ddtrace-0.36.0 lib/ddtrace/contrib/resque/integration.rb
ddtrace-0.35.2 lib/ddtrace/contrib/resque/integration.rb
ddtrace-0.35.1 lib/ddtrace/contrib/resque/integration.rb
ddtrace-0.35.0 lib/ddtrace/contrib/resque/integration.rb
ddtrace-0.34.2 lib/ddtrace/contrib/resque/integration.rb
ddtrace-0.34.1 lib/ddtrace/contrib/resque/integration.rb
ddtrace-0.34.0 lib/ddtrace/contrib/resque/integration.rb
ddtrace-0.33.1 lib/ddtrace/contrib/resque/integration.rb