Revert "改名"
This reverts commit fdf58326
This commit is contained in:
+7
-1
@@ -42,8 +42,14 @@ class ProcessManager
|
|||||||
$system = sprintf('[%s].process', Config::get('id', 'system-service'));
|
$system = sprintf('[%s].process', Config::get('id', 'system-service'));
|
||||||
|
|
||||||
$this->logger->debug($system . ' ' . $customProcess->getName() . ' start.');
|
$this->logger->debug($system . ' ' . $customProcess->getName() . ' start.');
|
||||||
|
$process = $this->parse($customProcess, $system);
|
||||||
|
if (Context::inCoroutine()) {
|
||||||
|
Coroutine::create(function () use ($process) {
|
||||||
|
$process->start();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
$server->addProcess($process = $this->parse($customProcess, $system));
|
$server->addProcess($process = $this->parse($customProcess, $system));
|
||||||
|
}
|
||||||
$this->_process[$customProcess->getName()] = $process;
|
$this->_process[$customProcess->getName()] = $process;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -61,9 +61,6 @@ class ServerManager extends Component
|
|||||||
private Server|null $server = null;
|
private Server|null $server = null;
|
||||||
|
|
||||||
|
|
||||||
protected array $initProcesses = [];
|
|
||||||
|
|
||||||
|
|
||||||
const DEFAULT_EVENT = [
|
const DEFAULT_EVENT = [
|
||||||
Constant::WORKER_START => [OnServerWorker::class, 'onWorkerStart'],
|
Constant::WORKER_START => [OnServerWorker::class, 'onWorkerStart'],
|
||||||
Constant::WORKER_EXIT => [OnServerWorker::class, 'onWorkerExit'],
|
Constant::WORKER_EXIT => [OnServerWorker::class, 'onWorkerExit'],
|
||||||
@@ -160,15 +157,6 @@ class ServerManager extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array<string,Process>
|
|
||||||
*/
|
|
||||||
public function getProcesses(): array
|
|
||||||
{
|
|
||||||
return $this->initProcesses;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user