6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/appsignal/integrations/rake.rb', line 6
def execute(*args)
super
rescue Exception => error 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
|