mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-16 05:05:34 +08:00
add context() fetch data mode
enable coroutine override
This commit is contained in:
@@ -94,6 +94,7 @@ class WorkerStartEvent implements SwooleEvent
|
||||
$class = new $class_name(["server" => $this->server, "worker_id" => $this->worker_id], ModHandleType::SWOOLE_WORKER_START);
|
||||
call_user_func_array([$class, $v->method], []);
|
||||
}
|
||||
set_coroutine_params(["server" => $this->server, "worker_id" => $this->worker_id]);
|
||||
foreach (ZMBuf::$events[SwooleEventAfter::class] ?? [] as $v) {
|
||||
/** @var AnnotationBase $v */
|
||||
if (strtolower($v->type) == "workerstart") {
|
||||
@@ -156,4 +157,4 @@ class WorkerStartEvent implements SwooleEvent
|
||||
DataProvider::saveBuffer();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user