Class: WorkerKiller::RufusScheduler::JobsLimiter
- Inherits:
-
BaseLimiter
- Object
- BaseLimiter
- WorkerKiller::RufusScheduler::JobsLimiter
- Defined in:
- lib/worker_killer/rufus_scheduler/jobs_limiter.rb
Overview
Register rufus process killer by RAM usage.
Instance Attribute Summary
Attributes inherited from BaseLimiter
#frequency, #job_filter, #killer, #limiter, #scheduler, #timeout
Instance Method Summary collapse
-
#initialize(scheduler:, timeout:, logger: nil, job_filter: nil, **limiter_kwargs) ⇒ JobsLimiter
constructor
A new instance of JobsLimiter.
Methods inherited from BaseLimiter
#check_after_job?, #register, register, #run_check
Constructor Details
#initialize(scheduler:, timeout:, logger: nil, job_filter: nil, **limiter_kwargs) ⇒ JobsLimiter
Returns a new instance of JobsLimiter.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/worker_killer/rufus_scheduler/jobs_limiter.rb', line 12 def initialize(scheduler:, timeout:, logger: nil, job_filter: nil, **limiter_kwargs) limiter = ::WorkerKiller::CountLimiter.new(**limiter_kwargs) super( scheduler: scheduler, frequency: nil, timeout: timeout, limiter: limiter, logger: logger, job_filter: job_filter ) end |