Class: Wurk::Railtie
- Inherits:
-
Rails::Railtie
- Object
- Rails::Railtie
- Wurk::Railtie
- Defined in:
- lib/wurk/railtie.rb
Overview
Boot the swarm after the host app has fully initialized. Skip when: WURK_DISABLED=1, Rails console mode, or Rails test env. See docs/idea/03-process-model.md for the exact ordering.
Class Method Summary collapse
-
.skip_boot? ⇒ Boolean
A process that won’t run workers isn’t a server: skip both server mode and the swarm boot.
Class Method Details
.skip_boot? ⇒ Boolean
A process that won’t run workers isn’t a server: skip both server mode and the swarm boot. Console mode is detected reliably here — the console command file defines ::Rails::Console before initializers run.
38 39 40 |
# File 'lib/wurk/railtie.rb', line 38 def self.skip_boot? ENV['WURK_DISABLED'] == '1' || defined?(::Rails::Console) || ::Rails.env.test? end |