This commit is contained in:
as2252258@163.com
2021-03-20 03:22:27 +08:00
parent ee8298bdb7
commit b7ffd265a1
+7 -5
View File
@@ -112,15 +112,17 @@ class CrontabProcess extends Process
{ {
/** @var Crontab $content */ /** @var Crontab $content */
$content = unserialize($content); $content = unserialize($content);
$runTicker = function () use ($content) { // $runTicker = function () use ($content) {
$this->application->warning('execute crontab ' . date('Y-m-d H:i:s')); // $this->application->warning('execute crontab ' . date('Y-m-d H:i:s'));
$content->execute($this); // $content->execute($this);
}; // };
// $timer = $content->getTickTime() * 10; // $timer = $content->getTickTime() * 10;
$this->waitGroup->add(1); $this->waitGroup->add(1);
Timer::after(10000, function () use ($content) { var_dump(serialize($content));
Timer::after(3000, function () use ($content) {
$this->waitGroup->add(-1); $this->waitGroup->add(-1);
$this->application->warning('execute crontab ' . date('Y-m-d H:i:s')); $this->application->warning('execute crontab ' . date('Y-m-d H:i:s'));