Updated monitor method for Supervisor.php to allow for a non-blocking method.
This commit is contained in:
parent
9f822a494f
commit
3934a010d6
3 changed files with 13 additions and 5 deletions
|
@ -314,15 +314,16 @@
|
|||
/**
|
||||
* Monitors the workers and restarts them if they die unexpectedly (monitor mode only)
|
||||
*
|
||||
* @param bool $blocking
|
||||
* @param bool $auto_restart
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function monitor(bool $auto_restart=false): void
|
||||
public static function monitor(bool $blocking=false, bool $auto_restart=true): void
|
||||
{
|
||||
if (self::$mode === Mode::Client)
|
||||
{
|
||||
self::$supervisor->monitor($auto_restart);
|
||||
self::$supervisor->monitor($blocking, $auto_restart);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue