This commit is contained in:
2020-09-04 00:41:33 +08:00
parent 622071256e
commit 46f9de1f6a
141 changed files with 105 additions and 73 deletions
-41
View File
@@ -1,41 +0,0 @@
<?php
namespace HttpServer\Events;
use HttpServer\Events\Abstracts\Callback;
use Snowflake\Event;
use Snowflake\Snowflake;
use Swoole\Server;
/**
* Class OnManagerStop
* @package HttpServer\Events
*/
class OnManagerStop extends Callback
{
/**
* @param $server
* @throws \Exception
*/
public function onHandler(Server $server)
{
$this->warning('manager stop.');
$events = Snowflake::app()->event;
if ($events->exists(Event::SERVER_MANAGER_STOP)) {
$events->trigger(Event::SERVER_MANAGER_STOP, [$server]);
}
// $runPath = storage(null, 'workerIds');
// foreach (glob($runPath . '/*') as $item) {
// if (!file_exists($item)) {
// continue;
// }
// @unlink($item);
// }
}
}