Module: SolidQueueGuard::Observability Private
- Defined in:
- lib/solid_queue_guard/observability.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
- .log_results(report) ⇒ Object private
- .logger ⇒ Object private
- .notify_status_change(report, previous_status: nil) ⇒ Object private
Class Method Details
.log_results(report) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/solid_queue_guard/observability.rb', line 8 def log_results(report) return unless logger report.results.each do |result| = "[SolidQueueGuard] #{result.status} check #{result.id}: #{result.}" case result.status when :skip, :pass then logger.debug() when :warn then logger.warn() when :fail then logger.error() end end end |
.logger ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
31 32 33 |
# File 'lib/solid_queue_guard/observability.rb', line 31 def logger defined?(Rails) && Rails.logger end |
.notify_status_change(report, previous_status: nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 24 25 26 27 28 29 |
# File 'lib/solid_queue_guard/observability.rb', line 21 def notify_status_change(report, previous_status: nil) callback = SolidQueueGuard.config.on_status_change return unless callback.respond_to?(:call) current_status = report.status return if previous_status == current_status callback.call(previous_status, current_status, report) end |