Closed slushpuppy closed 3 weeks ago
When a custom process receives a specific signal, it will call back a specific method. SIGUSR1: onReload() SIGTERM: onStop()
// Requirements: LaravelS >= v3.4.0 & callback() must be async non-blocking program.
public static function onReload(Server $swoole, Process $process)
{
// Stop the process...
// Then end process
\Log::info('Test process: reloading');
self::$quit = true;
// $process->exit(0); // Force exit process
}
// Requirements: LaravelS >= v3.7.4 & callback() must be async non-blocking program.
public static function onStop(Server $swoole, Process $process)
{
// Stop the process...
// Then end process
\Log::info('Test process: stopping');
self::$quit = true;
// $process->exit(0); // Force exit process
}
Hi, I see the boilerplate static ::quit property which is used to control the infinite loop inside callback, may I know how this property is managed by process manager during a reload? Searching this repository, I don't see any reference of it being set back to true during a SIGUSR1 reload