| Module | Spawn |
| In: |
lib/spawn.rb
|
| RAILS_1_x | = | (::Rails::VERSION::MAJOR == 1) unless defined?(RAILS_1_x) |
| RAILS_2_2 | = | (::Rails::VERSION::MAJOR > 2 || (::Rails::VERSION::MAJOR == 2 && ::Rails::VERSION::MINOR >= 2)) unless defined?(RAILS_2_2) |
add calls to this in your environment.rb to set your configuration, for example, to use forking everywhere except your ‘development’ environment:
Spawn::method :fork Spawn::method :thread, 'development'
Spawns a long-running section of code and returns the ID of the spawned process. By default the process will be a forked process. To use threading, pass :method => :thread or override the default behavior in the environment by setting ‘Spawn::method :thread’.