modify
This commit is contained in:
@@ -34,13 +34,16 @@ class CrontabProcess extends Process
|
|||||||
public function onHandler(\Swoole\Process $process): void
|
public function onHandler(\Swoole\Process $process): void
|
||||||
{
|
{
|
||||||
while (true) {
|
while (true) {
|
||||||
$content = $process->read();
|
try {
|
||||||
$_content = json_decode($content, true);
|
$content = $process->read();
|
||||||
var_dump($content, $_content);
|
$_content = json_decode($content, true);
|
||||||
if (is_null($_content)) {
|
if (is_null($_content)) {
|
||||||
$this->jobDelivery($content);
|
$this->jobDelivery($content);
|
||||||
} else {
|
} else {
|
||||||
$this->otherAction($_content);
|
$this->otherAction($_content);
|
||||||
|
}
|
||||||
|
} catch (\Throwable $exception) {
|
||||||
|
$this->application->error($exception->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,6 +80,7 @@ class CrontabProcess extends Process
|
|||||||
{
|
{
|
||||||
$content = unserialize($content);
|
$content = unserialize($content);
|
||||||
$this->names[$content->getName()] = $content;
|
$this->names[$content->getName()] = $content;
|
||||||
|
var_dump($content);
|
||||||
if (!($content instanceof Crontab)) {
|
if (!($content instanceof Crontab)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user