Class: Euston::Daemon
- Inherits:
-
Object
- Object
- Euston::Daemon
- Defined in:
- lib/euston-daemons/euston/daemon.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(data) ⇒ Daemon
constructor
A new instance of Daemon.
- #run ⇒ Object
Constructor Details
#initialize(data) ⇒ Daemon
Returns a new instance of Daemon.
3 4 5 6 7 8 |
# File 'lib/euston-daemons/euston/daemon.rb', line 3 def initialize data @log = data[:logger] @queue = Queue.new @components = [] @errors = [] end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/euston-daemons/euston/daemon.rb', line 10 def run Thread.abort_on_exception = true pre_registration_setup register_components trap_exit_signals start_components wait_for_shutdown_event stop_components post_shutdown_cleanup report_shutdown_reasons end |