Class: SolidQueueGuard::Health::Payload Private
- Inherits:
-
Object
- Object
- SolidQueueGuard::Health::Payload
- Defined in:
- lib/solid_queue_guard/health/payload.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize(report) ⇒ Payload
constructor
private
A new instance of Payload.
- #to_h ⇒ Object private
Constructor Details
#initialize(report) ⇒ Payload
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.
Returns a new instance of Payload.
7 8 9 |
# File 'lib/solid_queue_guard/health/payload.rb', line 7 def initialize(report) @report = report end |
Instance Method Details
#to_h ⇒ 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.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/solid_queue_guard/health/payload.rb', line 11 def to_h base = report.to_h.merge( queue_lag_seconds: queue_lag_seconds, failed_jobs_last_hour: failed_jobs_last_hour, dead_processes: dead_processes ) base[:recommendations] = topology_recommendations if topology_recommendations.any? base end |