Method: NewRelic::Agent::WorkerLoop#initialize
- Defined in:
- lib/new_relic/agent/worker_loop.rb
#initialize(opts = {}) ⇒ WorkerLoop
Optional argument :duration (in seconds) for how long the worker loop runs or :limit (integer) for max number of iterations
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/new_relic/agent/worker_loop.rb', line 17 def initialize(opts = {}) @should_run = true @next_invocation_time = Process.clock_gettime(Process::CLOCK_REALTIME) @period = 60.0 @duration = opts[:duration] @limit = opts[:limit] @iterations = 0 @propagate_errors = opts.fetch(:propagate_errors, false) @deadline = nil end |