Sha256: 1b11bf69702db124ef3dbb7bfb2346fc5e6170ab25d59909b2be9386cbbdfe5d

Contents?: true

Size: 427 Bytes

Versions: 12

Compression:

Stored size: 427 Bytes

Contents

if defined?(::Unicorn)
  Appsignal.logger.info('Loading Unicorn integration')

  # Make sure the last transaction in a worker gets flushed.
  #
  # We'd love to be able to hook this into Unicorn in a less
  # intrusive way, but this is the best we can do given the
  # options we have.

  class Unicorn::Worker
    alias_method :original_close, :close

    def close
      Appsignal.stop
      original_close
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
appsignal-0.12.beta.50 lib/appsignal/integrations/unicorn.rb
appsignal-0.12.beta.49 lib/appsignal/integrations/unicorn.rb
appsignal-0.12.beta.48 lib/appsignal/integrations/unicorn.rb
appsignal-0.12.beta.47 lib/appsignal/integrations/unicorn.rb
appsignal-0.12.beta.46 lib/appsignal/integrations/unicorn.rb
appsignal-0.12.beta.45 lib/appsignal/integrations/unicorn.rb
appsignal-0.12.beta.44 lib/appsignal/integrations/unicorn.rb
appsignal-0.12.beta.43 lib/appsignal/integrations/unicorn.rb
appsignal-0.12.beta.42 lib/appsignal/integrations/unicorn.rb
appsignal-0.12.beta.41 lib/appsignal/integrations/unicorn.rb
appsignal-0.12.beta.40 lib/appsignal/integrations/unicorn.rb
appsignal-0.12.beta.39 lib/appsignal/integrations/unicorn.rb