Sha256: 1873556719d9a68bb2807b596eb645d2e9d4f6b9f1c4923b0ece374d1741692a
Contents?: true
Size: 809 Bytes
Versions: 1
Compression:
Stored size: 809 Bytes
Contents
# frozen_string_literal: true module WorkerKiller module RufusScheduler # Register rufus process killer by RAM usage. class JobsLimiter < ::WorkerKiller::RufusScheduler::BaseLimiter # @param scheduler [Rufus::Scheduler] # @param limiter_kwargs [Hash] # @param timeout [Integer] # @param logger [Logger,nil] # @param job_filter [Proc,nil] used to select which jobs should be counted 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 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
worker_killer-rufus_scheduler-1.1.0 | lib/worker_killer/rufus_scheduler/jobs_limiter.rb |