Class: Zeus::Server::ProcessTreeMonitor
- Inherits:
-
Object
- Object
- Zeus::Server::ProcessTreeMonitor
show all
- Includes:
- ChildProcessApi
- Defined in:
- lib/zeus/server/process_tree_monitor.rb
Defined Under Namespace
Modules: ChildProcessApi
Constant Summary
collapse
- STARTING_MARKER =
"P"
- FEATURE_MARKER =
"F"
Instance Method Summary
collapse
#__CHILD__stage_has_feature, #__CHILD__stage_starting_with_pid
Constructor Details
Returns a new instance of ProcessTreeMonitor.
12
13
14
15
16
17
|
# File 'lib/zeus/server/process_tree_monitor.rb', line 12
def initialize(file_monitor, tree)
@root = tree
@file_monitor = file_monitor
@sock, @__CHILD__sock = open_socketpair
end
|
Instance Method Details
#close_child_socket ⇒ Object
9
|
# File 'lib/zeus/server/process_tree_monitor.rb', line 9
def close_child_socket ; @__CHILD__sock.close ; end
|
#close_parent_socket ⇒ Object
10
|
# File 'lib/zeus/server/process_tree_monitor.rb', line 10
def close_parent_socket ; @sock.close ; end
|
#datasource ⇒ Object
7
|
# File 'lib/zeus/server/process_tree_monitor.rb', line 7
def datasource ; @sock ; end
|
#kill_all_nodes ⇒ Object
23
24
25
|
# File 'lib/zeus/server/process_tree_monitor.rb', line 23
def kill_all_nodes
@root.kill!
end
|
#kill_nodes_with_feature(file) ⇒ Object
19
20
21
|
# File 'lib/zeus/server/process_tree_monitor.rb', line 19
def kill_nodes_with_feature(file)
@root.kill_nodes_with_feature(file)
end
|
#on_datasource_event ⇒ Object
8
|
# File 'lib/zeus/server/process_tree_monitor.rb', line 8
def on_datasource_event ; handle_messages ; end
|