Class: DaemonKit::Application
- Inherits:
-
Object
- Object
- DaemonKit::Application
- Defined in:
- lib/daemon_kit/application.rb
Overview
Class responsible for making the daemons run and keep them running.
Class Method Summary collapse
-
.run(file) ⇒ Object
Run the file as a daemon.
-
.running! ⇒ Object
Call this from inside a daemonized process to complete the initialization process.
Class Method Details
.run(file) ⇒ Object
Run the file as a daemon
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/daemon_kit/application.rb', line 11 def run( file ) raise DaemonNotFound.new( file ) unless File.exist?( file ) app_name = DaemonKit.configuration.daemon_name || File.basename( file ) = { :backtrace => true, :log_output => true, :app_name => app_name, :dir_mode => :normal, :dir => "log" } [:multiple] = DaemonKit.configuration.multiple [:force_kill_wait] = DaemonKit.configuration.force_kill_wait if DaemonKit.configuration.force_kill_wait Daemons.run( file, ) end |
.running! ⇒ Object
Call this from inside a daemonized process to complete the initialization process
25 26 27 |
# File 'lib/daemon_kit/application.rb', line 25 def running! DaemonKit::Initializer.continue! end |