改名
This commit is contained in:
@@ -19,20 +19,19 @@ use Swoole\Server;
|
||||
class OnPipeMessage extends Callback
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Server $server
|
||||
* @param int $src_worker_id
|
||||
* @param $message
|
||||
* @throws Exception
|
||||
*/
|
||||
public function onHandler(Server $server, int $src_worker_id, $message)
|
||||
/**
|
||||
* @param Server $server
|
||||
* @param int $src_worker_id
|
||||
* @param $swollen_universalize
|
||||
* @throws Exception
|
||||
*/
|
||||
public function onHandler(Server $server, int $src_worker_id, $swollen_universalize)
|
||||
{
|
||||
try {
|
||||
$swollen_universalize = swoole_unserialize($message);
|
||||
match ($swollen_universalize['action'] ?? null) {
|
||||
'kafka' => $this->onKafkaWorker($swollen_universalize),
|
||||
'crontab' => $this->onCrontabWorker($swollen_universalize),
|
||||
default => $this->onMessageWorker($server, $src_worker_id, $message)
|
||||
default => $this->onMessageWorker($server, $src_worker_id, $swollen_universalize)
|
||||
};
|
||||
} catch (\Throwable $exception) {
|
||||
$this->addError($exception);
|
||||
|
||||
Reference in New Issue
Block a user