Module: Datadog::Core::Workers::IntervalLoop::PrependedMethods Private

Defined in:
lib/datadog/core/workers/interval_loop.rb

Overview

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.

Methods that must be prepended

Instance Method Summary collapse

Instance Method Details

#in_iteration?Boolean

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.

Returns:

  • (Boolean)


39
40
41
# File 'lib/datadog/core/workers/interval_loop.rb', line 39

def in_iteration?
  defined?(@in_iteration) && @in_iteration
end

#perform(*args) ⇒ 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.



28
29
30
31
32
33
34
35
36
37
# File 'lib/datadog/core/workers/interval_loop.rb', line 28

def perform(*args)
  perform_loop do
    @in_iteration = true
    begin
      super(*args)
    ensure
      @in_iteration = false
    end
  end
end