Class: Archfiend::Application
- Inherits:
-
Object
- Object
- Archfiend::Application
- Extended by:
- Forwardable
- Defined in:
- lib/archfiend/application.rb
Instance Method Summary collapse
-
#run ⇒ Object
The main application entry point, it starts up all the subthreads, all the subprocesses, registers the exit handler and then it blocks the execution.
- #setup ⇒ Object
Instance Method Details
#run ⇒ Object
The main application entry point, it starts up all the subthreads, all the subprocesses, registers the exit handler and then it blocks the execution.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/archfiend/application.rb', line 9 def run setup logger.info 'Starting up' ThreadLoop.start_all(self) SubprocessLoop.start_all(self) run_clockwork # Setup after subprocesses are created, so the handler is not copied to them setup_cleanup loop { sleep 1 } end |
#setup ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/archfiend/application.rb', line 23 def setup return if @already_setup setup_timezone setup_settings setup_logger setup_activerecord setup_debug run_initializers require_app_classes @already_setup = true end |