This commit is contained in:
as2252258@163.com
2021-03-20 02:48:29 +08:00
parent 8a56598d73
commit 3d539c8b54
+11 -7
View File
@@ -34,13 +34,16 @@ class CrontabProcess extends Process
public function onHandler(\Swoole\Process $process): void
{
while (true) {
$content = $process->read();
$_content = json_decode($content, true);
var_dump($content, $_content);
if (is_null($_content)) {
$this->jobDelivery($content);
} else {
$this->otherAction($_content);
try {
$content = $process->read();
$_content = json_decode($content, true);
if (is_null($_content)) {
$this->jobDelivery($content);
} else {
$this->otherAction($_content);
}
} catch (\Throwable $exception) {
$this->application->error($exception->getMessage());
}
}
}
@@ -77,6 +80,7 @@ class CrontabProcess extends Process
{
$content = unserialize($content);
$this->names[$content->getName()] = $content;
var_dump($content);
if (!($content instanceof Crontab)) {
return;
}