modify
This commit is contained in:
@@ -80,18 +80,18 @@ class CrontabProcess extends Process
|
|||||||
{
|
{
|
||||||
/** @var Crontab $content */
|
/** @var Crontab $content */
|
||||||
$content = unserialize($content);
|
$content = unserialize($content);
|
||||||
$this->names[$content->getName()] = $content;
|
|
||||||
|
|
||||||
$runTicker = function (Crontab $crontab) {
|
$runTicker = function (Crontab $crontab) {
|
||||||
|
var_dump(get_called_class());
|
||||||
$crontab->execute();
|
$crontab->execute();
|
||||||
};
|
};
|
||||||
$timer = $content->getTickTime() * 1000;
|
$timer = $content->getTickTime() * 1000;
|
||||||
|
var_dump($timer);
|
||||||
if ($content->isLoop()) {
|
if ($content->isLoop()) {
|
||||||
$timerId = Timer::tick($timer, $runTicker, $content);
|
$content->setTimerId(Timer::tick($timer, $runTicker, $content));
|
||||||
} else {
|
} else {
|
||||||
$timerId = Timer::after($timer, $runTicker, $content);
|
$content->setTimerId(Timer::after($timer, $runTicker, $content));
|
||||||
}
|
}
|
||||||
$content->setTimerId($timerId);
|
$this->names[$content->getName()] = $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user