Sha256: 7898fc215642e5aa5ee609c3cd5b86418f9bafa70a6f69d9ba99eeca94b55e15

Contents?: true

Size: 779 Bytes

Versions: 188

Compression:

Stored size: 779 Bytes

Contents

# frozen_string_literal: true

module Appsignal
  module Integrations
    module RakeIntegration
      def execute(*args)
        super
      rescue Exception => error # rubocop:disable Lint/RescueException
        # Format given arguments and cast to hash if possible
        params, _ = args
        params = params.to_hash if params.respond_to?(:to_hash)

        transaction = Appsignal::Transaction.create(
          SecureRandom.uuid,
          Appsignal::Transaction::BACKGROUND_JOB,
          Appsignal::Transaction::GenericRequest.new(
            :params => params
          )
        )
        transaction.set_action(name)
        transaction.set_error(error)
        transaction.complete
        Appsignal.stop("rake")
        raise error
      end
    end
  end
end

Version data entries

188 entries across 188 versions & 1 rubygems

Version Path
appsignal-3.3.1-java lib/appsignal/integrations/rake.rb
appsignal-3.3.1 lib/appsignal/integrations/rake.rb
appsignal-3.3.0-java lib/appsignal/integrations/rake.rb
appsignal-3.3.0 lib/appsignal/integrations/rake.rb
appsignal-3.2.2-java lib/appsignal/integrations/rake.rb
appsignal-3.2.2 lib/appsignal/integrations/rake.rb
appsignal-3.2.1-java lib/appsignal/integrations/rake.rb
appsignal-3.2.1 lib/appsignal/integrations/rake.rb
appsignal-3.2.0-java lib/appsignal/integrations/rake.rb
appsignal-3.2.0 lib/appsignal/integrations/rake.rb
appsignal-3.1.6-java lib/appsignal/integrations/rake.rb
appsignal-3.1.6 lib/appsignal/integrations/rake.rb
appsignal-3.1.5-java lib/appsignal/integrations/rake.rb
appsignal-3.1.5 lib/appsignal/integrations/rake.rb
appsignal-3.1.4-java lib/appsignal/integrations/rake.rb
appsignal-3.1.4 lib/appsignal/integrations/rake.rb
appsignal-3.1.3-java lib/appsignal/integrations/rake.rb
appsignal-3.1.3 lib/appsignal/integrations/rake.rb
appsignal-3.1.2-java lib/appsignal/integrations/rake.rb
appsignal-3.1.2 lib/appsignal/integrations/rake.rb