modify
This commit is contained in:
@@ -116,34 +116,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'));
|
|
||||||
// $content->execute($this);
|
|
||||||
// };
|
|
||||||
// $timer = $content->getTickTime() * 10;
|
|
||||||
|
|
||||||
|
|
||||||
var_dump(serialize($content));
|
|
||||||
|
|
||||||
Timer::after(3000, 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;
|
||||||
var_dump(Timer::stats());
|
if ($content->isLoop()) {
|
||||||
|
$content->setTimerId(Timer::tick($timer, $runTicker));
|
||||||
// if ($content->isLoop()) {
|
} else {
|
||||||
// $content->setTimerId(Timer::tick($timer, function () use ($content) {
|
$content->setTimerId(Timer::after($timer, $runTicker));
|
||||||
// $this->application->warning('execute crontab ' . date('Y-m-d H:i:s'));
|
}
|
||||||
// $content->execute($this);
|
$this->names[$content->getName()] = $content;
|
||||||
// }));
|
|
||||||
// } else {
|
|
||||||
// $content->setTimerId(Timer::after($timer, function () use ($content) {
|
|
||||||
// $this->application->warning('execute crontab ' . date('Y-m-d H:i:s'));
|
|
||||||
// $content->execute($this);
|
|
||||||
// }));
|
|
||||||
// }
|
|
||||||
// $this->names[$content->getName()] = $content;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user