Class: Workling::Remote::Runners::SpawnRunner

Inherits:
Base
  • Object
show all
Includes:
Spawn
Defined in:
lib/workling/remote/runners/spawn_runner.rb

Constant Summary collapse

@@options =

use thread for development and test modes. easier to hunt down exceptions that way.

{ :method => (RAILS_ENV == "test" || RAILS_ENV == "development" ? :thread : :fork) }

Instance Method Summary collapse

Methods inherited from Base

#dispatch!, #logger

Instance Method Details

#run(clazz, method, options = {}) ⇒ Object

dispatches to Spawn, using the :fork option.



28
29
30
31
32
33
34
# File 'lib/workling/remote/runners/spawn_runner.rb', line 28

def run(clazz, method, options = {})
  spawn(SpawnRunner.options) do # exceptions are trapped in here. 
    dispatch!(clazz, method, options)
  end
  
  return nil # that means nothing!
end