Class: RailsLiveDashboard::Recorders::Jobs::EnqueueRecorder

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_live_dashboard/recorders/jobs/enqueue_recorder.rb

Instance Method Summary collapse

Constructor Details

#initialize(event) ⇒ EnqueueRecorder

Returns a new instance of EnqueueRecorder.



5
6
7
# File 'lib/rails_live_dashboard/recorders/jobs/enqueue_recorder.rb', line 5

def initialize(event)
  @event = event
end

Instance Method Details

#executeObject



9
10
11
12
13
14
# File 'lib/rails_live_dashboard/recorders/jobs/enqueue_recorder.rb', line 9

def execute
  Job.create(
    batch_id: Current.batch_id,
    content: build_content
  )
end