Class: Maxwell::Agent::Runner

Inherits:
Celluloid::SupervisionGroup
  • Object
show all
Defined in:
lib/maxwell/agent/runner.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ Runner

Returns a new instance of Runner.



23
24
25
26
# File 'lib/maxwell/agent/runner.rb', line 23

def initialize(opts)
  super
  wait_for_actor_boot
end

Instance Attribute Details

#registryObject (readonly)

Returns the value of attribute registry.



9
10
11
# File 'lib/maxwell/agent/runner.rb', line 9

def registry
  @registry
end

Class Method Details

.worker_pool_sizeObject



11
12
13
# File 'lib/maxwell/agent/runner.rb', line 11

def self.worker_pool_size
  Maxwell.configuration.worker_concurrency
end

Instance Method Details

#[](actor_name) ⇒ Object



19
20
21
# File 'lib/maxwell/agent/runner.rb', line 19

def [](actor_name)
  @registry[actor_name]
end

#wait_for_actor_bootObject



28
29
30
31
32
33
34
# File 'lib/maxwell/agent/runner.rb', line 28

def wait_for_actor_boot
  loop do
    break if self[:work_schedule] &&
      self[:worker] &&
      self[:scheduler]
  end
end