Class: Karafka::Pro::RecurringTasks::Listener
- Inherits:
-
Object
- Object
- Karafka::Pro::RecurringTasks::Listener
- Defined in:
- lib/karafka/pro/recurring_tasks/listener.rb
Overview
Listener we use to track execution of recurring tasks and publish those events into the recurring tasks log table
Instance Method Summary collapse
Instance Method Details
#on_error_occurred(event) ⇒ Object
Note:
We do nothing with other errors. We only want to log and dispatch information about the recurring tasks errors. The general Web UI error tracking may also work but those are independent. It is not to replace the Web UI tracking but to just log failed executions in the same way as successful but just with the failure as an outcome.
39 40 41 42 43 |
# File 'lib/karafka/pro/recurring_tasks/listener.rb', line 39 def on_error_occurred(event) return unless event[:type] == 'recurring_tasks.task.execute.error' Dispatcher.log(event) end |
#on_recurring_tasks_task_executed(event) ⇒ Object
30 31 32 |
# File 'lib/karafka/pro/recurring_tasks/listener.rb', line 30 def on_recurring_tasks_task_executed(event) Dispatcher.log(event) end |