This commit is contained in:
as2252258@163.com
2021-04-17 15:58:24 +08:00
parent 0c038608a9
commit f104093fc3
+1 -4
View File
@@ -56,14 +56,11 @@ class Zookeeper extends Process
try { try {
$params['action'] = 'crontab'; $params['action'] = 'crontab';
if (empty($handler = $redis->get('crontab:' . $value))) { if (empty($handler = $redis->get('crontab:' . $value))) {
var_dump($handler);
return; return;
} }
$params['handler'] = swoole_unserialize($handler); $params['handler'] = swoole_unserialize($handler);
$result = $server->sendMessage($params, $workerId = random_int(0, $setting - 1)); $server->sendMessage($params, random_int(0, $setting - 1));
var_dump('send crontab to ' . $workerId . ' ' . intval($result));
} catch (Throwable $exception) { } catch (Throwable $exception) {
logger()->addError($exception); logger()->addError($exception);
} }