Class: Sneakers::Runner
- Inherits:
-
Object
- Object
- Sneakers::Runner
- Defined in:
- lib/sneakers/runner.rb
Instance Method Summary collapse
-
#initialize(worker_classes, opts = {}) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
- #stop(stop_graceful = true) ⇒ Object
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
#run ⇒ Object
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 |