Module: Appsignal::Integrations::RakeIntegrationHelper Private
- Defined in:
- lib/appsignal/integrations/rake.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
-
.at_exit_hook ⇒ Object
private
The at_exit hook itself.
-
.register_at_exit_hook ⇒ Object
private
Register an ‘at_exit` hook when a task is executed.
Class Method Details
.at_exit_hook ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The at_exit hook itself
53 54 55 |
# File 'lib/appsignal/integrations/rake.rb', line 53 def self.at_exit_hook Appsignal.stop("rake") end |
.register_at_exit_hook ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Register an ‘at_exit` hook when a task is executed. This will stop AppSignal when all tasks are executed and Rake exits.
44 45 46 47 48 49 50 |
# File 'lib/appsignal/integrations/rake.rb', line 44 def self.register_at_exit_hook return if @register_at_exit_hook Kernel.at_exit(&method(:at_exit_hook)) @register_at_exit_hook = true end |