Class: SidekiqAutoscale::Strategies::OldestJobScaling
- Inherits:
-
BaseScaling
- Object
- BaseScaling
- SidekiqAutoscale::Strategies::OldestJobScaling
- Defined in:
- lib/sidekiq_autoscale/strategies/oldest_job_scaling.rb
Constant Summary collapse
- LOG_TAG =
"[SIDEKIQ_SCALE][OLDEST_JOB_SCALING]"
Instance Method Summary collapse
Methods inherited from BaseScaling
Instance Method Details
#scaling_direction(_job) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/sidekiq_autoscale/strategies/oldest_job_scaling.rb', line 11 def scaling_direction(_job) return -1 if workload_too_low? return 1 if workload_too_high? 0 end |
#workload_change_needed?(_job) ⇒ Boolean
7 8 9 |
# File 'lib/sidekiq_autoscale/strategies/oldest_job_scaling.rb', line 7 def workload_change_needed?(_job) workload_too_high? || workload_too_low? end |