This commit is contained in:
as2252258@163.com
2021-02-27 04:18:44 +08:00
parent c83a98b50c
commit 6c35bc2b6c
+4 -2
View File
@@ -44,8 +44,10 @@ class OnWorkerStart extends Callback
Coroutine\go(function () use ($server) {
Coroutine::waitPid($server->worker_pid);
});
$this->debug(sprintf('Worker #%d is start.....', $worker_id));
putenv('workerId=' . ($worker_id >= $server->setting['worker_num'] ? 'Task' : 'Worker') . '.' . $worker_id);
$name = ($worker_id >= $server->setting['worker_num'] ? 'Task' : 'Worker');
$this->debug(sprintf($name . ' #%d is start.....', $worker_id));
putenv('workerId=' . $name . '.' . $worker_id);
if ($worker_id >= $server->setting['worker_num']) {
fire(Event::SERVER_TASK_START);
Coroutine\go(function () use ($server, $worker_id) {