Class: SidekiqUniqueJobs::Orphans::Observer
- Inherits:
-
Object
- Object
- SidekiqUniqueJobs::Orphans::Observer
- Includes:
- Logging
- Defined in:
- lib/sidekiq_unique_jobs/orphans/observer.rb
Overview
Observes the Orphan::Manager and provides information about each execution
Instance Method Summary collapse
-
#update(time, result, ex) ⇒ <type>
Runs every time the Manager executes the TimerTask used for logging information about the reaping.
Methods included from Logging
#build_message, included, #log_debug, #log_error, #log_fatal, #log_info, #log_warn, #logger, #logging_context, #with_configured_loggers_context, #with_logging_context
Instance Method Details
#update(time, result, ex) ⇒ <type>
Runs every time the Manager executes the TimerTask
used for logging information about the reaping
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/sidekiq_unique_jobs/orphans/observer.rb', line 30 def update(time, result, ex) if result log_info("(#{time}) Execution successfully returned #{result}") elsif ex.is_a?(Concurrent::TimeoutError) log_warn("(#{time}) Execution timed out") else log_info("(#{time}) Cleanup failed with error #{ex.}") log_error(ex) end end |