Class: Euston::Daemon
- Inherits:
-
Object
show all
- Defined in:
- lib/euston-daemons/euston/daemon.rb
Instance Method Summary
collapse
Constructor Details
#initialize(data) ⇒ 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
|