Sha256: dea536406616756d77fb8ddbdbd64f7c4e34995d118d73349eff7095025b97b4

Contents?: true

Size: 590 Bytes

Versions: 3

Compression:

Stored size: 590 Bytes

Contents

module Rake
  class Task
    alias_method :invoke_without_appsignal, :invoke

    def invoke(*args)
      transaction = Appsignal::Transaction.create(
        SecureRandom.uuid,
        ENV,
        :kind => 'background_job',
        :action => name,
        :params => args
      )

      invoke_without_appsignal(*args)
    rescue => exception
      unless Appsignal.is_ignored_exception?(exception)
        transaction.add_exception(exception)
      end
      raise exception
    ensure
      transaction.complete!
      Appsignal.agent.send_queue if Appsignal.active?
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
appsignal-0.11.13 lib/appsignal/integrations/rake.rb
appsignal-0.11.13.beta.4 lib/appsignal/integrations/rake.rb
appsignal-0.11.13.beta.3 lib/appsignal/integrations/rake.rb