Class: Sneakers::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/sneakers/runner.rb

Instance Method Summary collapse

Constructor Details

#initialize(worker_classes, opts = {}) ⇒ Runner

Returns a new instance of Runner.



6
7
8
# File 'lib/sneakers/runner.rb', line 6

def initialize(worker_classes, opts={})
  @runnerconfig = RunnerConfig.new(worker_classes, opts)
end

Instance Method Details

#runObject



10
11
12
13
# File 'lib/sneakers/runner.rb', line 10

def run
  @se = ServerEngine.create(nil, WorkerGroup) { @runnerconfig.reload_config! }
  @se.run
end

#stop(stop_graceful = true) ⇒ Object



15
16
17
# File 'lib/sneakers/runner.rb', line 15

def stop(stop_graceful=true)
  @se.stop(stop_graceful)
end