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.0.20-java lib/appsignal/integrations/rake.rb
appsignal-3.0.20 lib/appsignal/integrations/rake.rb
appsignal-3.0.19-java lib/appsignal/integrations/rake.rb
appsignal-3.0.19 lib/appsignal/integrations/rake.rb
appsignal-3.0.18-java lib/appsignal/integrations/rake.rb
appsignal-3.0.18 lib/appsignal/integrations/rake.rb
appsignal-3.0.17-java lib/appsignal/integrations/rake.rb
appsignal-3.0.17 lib/appsignal/integrations/rake.rb
appsignal-3.0.16-java lib/appsignal/integrations/rake.rb
appsignal-3.0.16 lib/appsignal/integrations/rake.rb
appsignal-3.0.15-java lib/appsignal/integrations/rake.rb
appsignal-3.0.15 lib/appsignal/integrations/rake.rb
appsignal-3.0.14-java lib/appsignal/integrations/rake.rb
appsignal-3.0.14 lib/appsignal/integrations/rake.rb
appsignal-3.0.13-java lib/appsignal/integrations/rake.rb
appsignal-3.0.13 lib/appsignal/integrations/rake.rb
appsignal-3.0.12-java lib/appsignal/integrations/rake.rb
appsignal-3.0.12 lib/appsignal/integrations/rake.rb
appsignal-3.0.11-java lib/appsignal/integrations/rake.rb
appsignal-3.0.11 lib/appsignal/integrations/rake.rb