Class: Salemove::ProcessHandler::ProcessMonitor
- Inherits:
-
Object
- Object
- Salemove::ProcessHandler::ProcessMonitor
show all
- Defined in:
- lib/salemove/process_handler/process_monitor.rb
Instance Method Summary
collapse
Instance Method Details
#alive? ⇒ Boolean
21
22
23
|
# File 'lib/salemove/process_handler/process_monitor.rb', line 21
def alive?
@state != :stopped
end
|
#running? ⇒ Boolean
17
18
19
|
# File 'lib/salemove/process_handler/process_monitor.rb', line 17
def running?
@state == :running
end
|
#shutdown ⇒ Object
13
14
15
|
# File 'lib/salemove/process_handler/process_monitor.rb', line 13
def shutdown
@state = :stopped
end
|
#start ⇒ Object
4
5
6
7
|
# File 'lib/salemove/process_handler/process_monitor.rb', line 4
def start
init_signal_handlers
@state = :running
end
|
#stop ⇒ Object
9
10
11
|
# File 'lib/salemove/process_handler/process_monitor.rb', line 9
def stop
@state = :stopping if alive?
end
|