This commit is contained in:
as2252258@163.com
2021-03-01 00:10:47 +08:00
parent bac262f90d
commit 5a433b0d7e
+2 -9
View File
@@ -25,16 +25,9 @@ class OnManagerStop extends Callback
{
$this->warning('manager stop.');
$events = Snowflake::app()->getEvent();
$events->trigger(Event::SERVER_MANAGER_STOP, [$server]);
fire(Event::SERVER_MANAGER_STOP, [$server]);
$runPath = storage(null, 'worker');
foreach (glob($runPath . '/*') as $item) {
if (!file_exists($item)) {
continue;
}
@unlink($item);
}
Snowflake::clearWorkerId();
}
}