This commit is contained in:
2021-07-23 17:54:08 +08:00
parent e57e600945
commit b7d0b0c3d6
2 changed files with 1 additions and 6 deletions
+1 -3
View File
@@ -74,13 +74,11 @@ class Zookeeper implements CustomProcess
private function dispatch(Redis|\Redis $redis, $value)
{
try {
$params['action'] = 'crontab';
if (empty($handler = $redis->get('crontab:' . $value))) {
return;
}
$params['handler'] = swoole_unserialize($handler);
$server = ServerManager::getContext()->getServer();
$server->sendMessage($params, $this->getWorker());
$server->sendMessage(swoole_unserialize($handler), $this->getWorker());
} catch (Throwable $exception) {
logger()->addError($exception);
}