Class: Hatchet::WorkerRuntime::DurableEviction::DurableEvictionConfig
- Inherits:
-
Object
- Object
- Hatchet::WorkerRuntime::DurableEviction::DurableEvictionConfig
- Defined in:
- lib/hatchet/worker/durable_eviction/manager.rb
Overview
Configuration for the background eviction loop.
Instance Attribute Summary collapse
-
#check_interval ⇒ Float
readonly
Seconds between eviction checks.
-
#min_wait_for_capacity_eviction ⇒ Float
readonly
Minimum seconds a run must have been waiting before it becomes eligible for capacity-based eviction.
-
#reserve_slots ⇒ Integer
readonly
Slots to reserve from capacity-eviction decisions.
Instance Method Summary collapse
-
#initialize(check_interval: 1.0, reserve_slots: 0, min_wait_for_capacity_eviction: 10.0) ⇒ DurableEvictionConfig
constructor
A new instance of DurableEvictionConfig.
Constructor Details
#initialize(check_interval: 1.0, reserve_slots: 0, min_wait_for_capacity_eviction: 10.0) ⇒ DurableEvictionConfig
Returns a new instance of DurableEvictionConfig.
20 21 22 23 24 25 |
# File 'lib/hatchet/worker/durable_eviction/manager.rb', line 20 def initialize(check_interval: 1.0, reserve_slots: 0, min_wait_for_capacity_eviction: 10.0) @check_interval = check_interval @reserve_slots = reserve_slots @min_wait_for_capacity_eviction = min_wait_for_capacity_eviction freeze end |
Instance Attribute Details
#check_interval ⇒ Float (readonly)
Returns Seconds between eviction checks.
13 14 15 |
# File 'lib/hatchet/worker/durable_eviction/manager.rb', line 13 def check_interval @check_interval end |
#min_wait_for_capacity_eviction ⇒ Float (readonly)
Returns Minimum seconds a run must have been waiting before it becomes eligible for capacity-based eviction.
18 19 20 |
# File 'lib/hatchet/worker/durable_eviction/manager.rb', line 18 def min_wait_for_capacity_eviction @min_wait_for_capacity_eviction end |
#reserve_slots ⇒ Integer (readonly)
Returns Slots to reserve from capacity-eviction decisions.
15 16 17 |
# File 'lib/hatchet/worker/durable_eviction/manager.rb', line 15 def reserve_slots @reserve_slots end |