Class: SidekiqHerokuScaler::Manager
- Inherits:
-
Object
- Object
- SidekiqHerokuScaler::Manager
- Defined in:
- lib/sidekiq-heroku-scaler/manager.rb
Instance Method Summary collapse
-
#initialize(heroku_app_name:, heroku_token:, workers:, strategy:) ⇒ Manager
constructor
A new instance of Manager.
- #perform ⇒ Object
Constructor Details
#initialize(heroku_app_name:, heroku_token:, workers:, strategy:) ⇒ Manager
Returns a new instance of Manager.
8 9 10 11 12 |
# File 'lib/sidekiq-heroku-scaler/manager.rb', line 8 def initialize(heroku_app_name:, heroku_token:, workers:, strategy:) @heroku_client = SidekiqHerokuScaler::Heroku::Client.new(heroku_app_name, heroku_token) @strategy = strategy @workers = workers end |
Instance Method Details
#perform ⇒ Object
14 15 16 17 18 |
# File 'lib/sidekiq-heroku-scaler/manager.rb', line 14 def perform autoscalable_workers.each do |worker_name| autoscale_one(worker_name) end end |