Class: HealthMonitor::Providers::DelayedJob
- Inherits:
-
Base
- Object
- Base
- HealthMonitor::Providers::DelayedJob
show all
- Defined in:
- lib/health_monitor/providers/delayed_job.rb
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary
Attributes inherited from Base
#configuration, #request
Instance Method Summary
collapse
Methods inherited from Base
#configure, #initialize
Instance Method Details
#check! ⇒ Object
23
24
25
26
27
|
# File 'lib/health_monitor/providers/delayed_job.rb', line 23
def check!
check_queue_size!
rescue Exception => e
raise DelayedJobException.new(e.message)
end
|
#check_queue_size! ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/health_monitor/providers/delayed_job.rb', line 29
def check_queue_size!
size = job_class.count
return unless size > configuration.queue_size
raise "queue size #{size} is greater than #{configuration.queue_size}"
end
|
#job_class ⇒ Object
37
38
39
|
# File 'lib/health_monitor/providers/delayed_job.rb', line 37
def job_class
@job_class ||= ::Delayed::Job
end
|