Class: Epilog::Rails::ActiveJobSubscriber
- Inherits:
-
LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- LogSubscriber
- Epilog::Rails::ActiveJobSubscriber
show all
- Defined in:
- lib/epilog/rails/active_job_subscriber.rb
Instance Attribute Summary
#logger
Instance Method Summary
collapse
#initialize
Instance Method Details
#enqueue(event) ⇒ Object
6
7
8
|
# File 'lib/epilog/rails/active_job_subscriber.rb', line 6
def enqueue(event)
info { event_hash('Enqueued job', event) }
end
|
#enqueue_at(event) ⇒ Object
10
11
12
|
# File 'lib/epilog/rails/active_job_subscriber.rb', line 10
def enqueue_at(event)
enqueue(event)
end
|
18
19
20
21
22
23
24
25
26
|
# File 'lib/epilog/rails/active_job_subscriber.rb', line 18
def perform(event)
info do
event_hash('Performed job', event).merge(
metrics: {
job_runtime: event.duration
}
)
end
end
|
14
15
16
|
# File 'lib/epilog/rails/active_job_subscriber.rb', line 14
def perform_start(event)
info { event_hash('Performing job', event) }
end
|