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.9.3-java lib/appsignal/integrations/rake.rb
appsignal-3.9.3 lib/appsignal/integrations/rake.rb
appsignal-3.9.2-java lib/appsignal/integrations/rake.rb
appsignal-3.9.2 lib/appsignal/integrations/rake.rb
appsignal-3.9.1-java lib/appsignal/integrations/rake.rb
appsignal-3.9.1 lib/appsignal/integrations/rake.rb
appsignal-3.9.0-java lib/appsignal/integrations/rake.rb
appsignal-3.9.0 lib/appsignal/integrations/rake.rb
appsignal-3.8.1-java lib/appsignal/integrations/rake.rb
appsignal-3.8.1 lib/appsignal/integrations/rake.rb
appsignal-3.8.0-java lib/appsignal/integrations/rake.rb
appsignal-3.8.0 lib/appsignal/integrations/rake.rb
appsignal-3.7.6-java lib/appsignal/integrations/rake.rb
appsignal-3.7.6 lib/appsignal/integrations/rake.rb
appsignal-3.7.2-java lib/appsignal/integrations/rake.rb
appsignal-3.7.2 lib/appsignal/integrations/rake.rb
appsignal-3.7.1-java lib/appsignal/integrations/rake.rb
appsignal-3.7.1 lib/appsignal/integrations/rake.rb
appsignal-3.7.0-java lib/appsignal/integrations/rake.rb
appsignal-3.7.0 lib/appsignal/integrations/rake.rb