Class: RailsBand::ActiveJob::Event::Interrupt

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

Overview

A wrapper for the event that is passed to interrupt.active_job.

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



8
9
10
# File 'lib/rails_band/active_job/event/interrupt.rb', line 8

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

#completed_steps ⇒ Object



24
25
26
# File 'lib/rails_band/active_job/event/interrupt.rb', line 24

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

#current_step ⇒ Object



28
29
30
# File 'lib/rails_band/active_job/event/interrupt.rb', line 28

def current_step
  @current_step ||= @event.payload[:current_step]
end

#description ⇒ Object



20
21
22
# File 'lib/rails_band/active_job/event/interrupt.rb', line 20

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

#job ⇒ Object



12
13
14
# File 'lib/rails_band/active_job/event/interrupt.rb', line 12

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

#reason ⇒ Object



16
17
18
# File 'lib/rails_band/active_job/event/interrupt.rb', line 16

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