class Server
The server represents the main supervisor process which is responsible for managing the lifecycle of other processes.
There are various tasks that can be executed by the server, such as restarting the process group, and querying the status of the processes. The server is also responsible for managing the lifecycle of the monitors, which can be used to monitor the status of the connected workers.
Definitions
def do_restart(call)
Restart the current process group, usually including the supervisor and any other processes.
Signature
-
parameter
signal
Symbol
The signal to send to the process group.
Implementation
def do_restart(call)
signal = call[:signal] || :INT
# We are going to terminate the progress group, including *this* process, so finish the current RPC before that:
call.finish
::Process.kill(signal, ::Process.ppid)
end