Module: ActiveJob::Traceable

Extended by:
ActiveSupport::Concern
Defined in:
lib/activejob/traceable.rb,
lib/activejob/traceable/version.rb,
lib/activejob/traceable/traceable.rb,
lib/activejob/traceable/logging_patch.rb

Defined Under Namespace

Modules: LoggingPatch

Constant Summary collapse

VERSION =
'0.3.3'

Class Method Summary collapse

Class Method Details

.tracing_info_getterObject



32
33
34
# File 'lib/activejob/traceable/traceable.rb', line 32

def tracing_info_getter
  @tracing_info_getter || -> { {} }
end

.tracing_info_getter=(lambda) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/activejob/traceable.rb', line 16

def tracing_info_getter=(lambda)
  if lambda
    raise 'Tracing info getter should be callable' unless lambda.respond_to?(:call)
    raise 'Tracing info getter should contain a hash' unless lambda.call.is_a?(Hash)

    @tracing_info_getter = lambda
  else
    # Resets the value
    @tracing_info_getter = nil
  end
end

.tracing_info_setterObject



36
37
38
# File 'lib/activejob/traceable/traceable.rb', line 36

def tracing_info_setter
  @tracing_info_setter || -> {}
end

.tracing_info_setter=(lambda) ⇒ Object



28
29
30
31
32
33
34
35
36
37
# File 'lib/activejob/traceable.rb', line 28

def tracing_info_setter=(lambda)
  if lambda
    raise 'Tracing info setter should be callable' unless lambda.respond_to?(:call)

    @tracing_info_setter = lambda
  else
    # Resets the value
    @tracing_info_setter = nil
  end
end