Class: Appsignal::Hooks::SidekiqHook

Inherits:
Hook
  • Object
show all
Defined in:
lib/appsignal/hooks/sidekiq.rb

Instance Method Summary collapse

Methods inherited from Hook

#installed?, register, #try_to_install

Instance Method Details

#dependencies_present?Boolean

Returns:

  • (Boolean)

47
48
49
# File 'lib/appsignal/hooks/sidekiq.rb', line 47

def dependencies_present?
  defined?(::Sidekiq)
end

#installObject


51
52
53
54
55
56
57
# File 'lib/appsignal/hooks/sidekiq.rb', line 51

def install
  ::Sidekiq.configure_server do |config|
    config.server_middleware do |chain|
      chain.add Appsignal::Hooks::SidekiqPlugin
    end
  end
end