Class: ScoutApm::ErrorService::PeriodicWork
- Inherits:
-
Object
- Object
- ScoutApm::ErrorService::PeriodicWork
- Defined in:
- lib/scout_apm/error_service/periodic_work.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
-
#initialize(context) ⇒ PeriodicWork
constructor
A new instance of PeriodicWork.
-
#run ⇒ Object
Expected to be called many times over the life of the agent.
Constructor Details
#initialize(context) ⇒ PeriodicWork
Returns a new instance of PeriodicWork.
6 7 8 9 |
# File 'lib/scout_apm/error_service/periodic_work.rb', line 6 def initialize(context) @context = context @notifier = ScoutApm::ErrorService::Notifier.new(context) end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
4 5 6 |
# File 'lib/scout_apm/error_service/periodic_work.rb', line 4 def context @context end |
Instance Method Details
#run ⇒ Object
Expected to be called many times over the life of the agent
12 13 14 |
# File 'lib/scout_apm/error_service/periodic_work.rb', line 12 def run @notifier.ship end |