Class: SidekiqAutoscale::NilAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq_autoscale/adapters/nil_adapter.rb

Instance Method Summary collapse

Constructor Details

#initializeNilAdapter

Returns a new instance of NilAdapter.



5
6
7
# File 'lib/sidekiq_autoscale/adapters/nil_adapter.rb', line 5

def initialize
  @sidekiq_adapter = ::SidekiqAutoscale::SidekiqInterface.new
end

Instance Method Details

#worker_countObject



9
10
11
# File 'lib/sidekiq_autoscale/adapters/nil_adapter.rb', line 9

def worker_count
  @sidekiq_adapter.total_workers
end

#worker_count=(val) ⇒ Object



13
14
15
# File 'lib/sidekiq_autoscale/adapters/nil_adapter.rb', line 13

def worker_count=(val)
  SidekiqAutoscale.logger.debug("Attempting to autoscale sidekiq to #{val} workers")
end