This commit is contained in:
as2252258@163.com
2021-04-23 03:38:26 +08:00
parent a5a607495f
commit 1edd8c5429
15 changed files with 264 additions and 278 deletions
+12 -13
View File
@@ -17,22 +17,21 @@ use Swoole\Timer;
class OnWorkerExit extends Callback
{
/**
* @param $server
* @param $worker_id
* @throws Exception
*/
public function onHandler($server, $worker_id)
{
putenv('state=exit');
$channel = Snowflake::app()->getChannel();
/**
* @param $server
* @param $worker_id
* @throws Exception
*/
public function onHandler($server, $worker_id)
{
putenv('state=exit');
$event = Snowflake::app()->getEvent();
$channel = Snowflake::app()->getChannel();
$channel->cleanAll();
$event = Snowflake::app()->getEvent();
$event->trigger(Event::SERVER_WORKER_EXIT);
$event->trigger(Event::SERVER_WORKER_EXIT);
logger_insert();
logger()->insert();
}
}