Updated monitor method for Supervisor.php to allow for a non-blocking method.

This commit is contained in:
Netkas 2023-03-01 18:55:30 -05:00
parent 9f822a494f
commit 3934a010d6
3 changed files with 13 additions and 5 deletions

View file

@ -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
{