Class: RailsBand::ActiveJob::Event::Step

Inherits:
BaseEvent
  • Object
show all
Defined in:
lib/rails_band/active_job/event/step.rb

Overview

A wrapper for the event that is passed to step.active_job. Unlike StepSkipped#step, this is the step itself, not the step name.

Instance Attribute Summary

Attributes inherited from BaseEvent

#allocations, #cpu_time, #duration, #end, #idle_time, #name, #time, #transaction_id

Instance Method Summary collapse

Methods inherited from BaseEvent

#initialize, #slice, #to_h

Constructor Details

This class inherits a constructor from RailsBand::BaseEvent

Instance Method Details

#adapter ⇒ Object



9
10
11
# File 'lib/rails_band/active_job/event/step.rb', line 9

def adapter
  @adapter ||= @event.payload.fetch(:adapter)
end

#interrupted ⇒ Object



21
22
23
24
25
# File 'lib/rails_band/active_job/event/step.rb', line 21

def interrupted
  return @interrupted if defined?(@interrupted)

  @interrupted = @event.payload.fetch(:interrupted)
end

#job ⇒ Object



13
14
15
# File 'lib/rails_band/active_job/event/step.rb', line 13

def job
  @job ||= @event.payload.fetch(:job)
end

#step ⇒ Object



17
18
19
# File 'lib/rails_band/active_job/event/step.rb', line 17

def step
  @step ||= @event.payload.fetch(:step)
end