modify
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user