warning('manager stop.'); $events = Snowflake::app()->event; $events->trigger(Event::SERVER_MANAGER_STOP, [$server]); $runPath = storage(null, 'worker'); foreach (glob($runPath . '/*') as $item) { if (!file_exists($item)) { continue; } @unlink($item); } } }