class NewRelic::Starter
NewRelic::Starter
starts the New Relic agent by calling {NewRelic::Agent.manual_start}.
Constants
- VERSION
Public Class Methods
new(latch)
click to toggle source
Return a new {Starter} object.
@param latch [NewRelic::Starter::Latch] the latch object @return [NewRelic::Starter] A new starter object
# File lib/new_relic/starter.rb, line 19 def initialize(latch) @latch = latch @started = false end
Public Instance Methods
start(options = {})
click to toggle source
Starts the new Relic agent if the agent is not started and the latch is opened.
@param options [Hash] The options passed through to
{NewRelic::Agent.manual_start}
@return [Boolean] true if the new Relic agent is started
# File lib/new_relic/starter.rb, line 30 def start(options = {}) return false if @started || !@latch.opened? NewRelic::Agent.manual_start(options) @started = true end