/**
* @return \Generator<MessageContext, object>
*/
public function getMessages(): \Generator
{ $checkpoint =
$this->
checkpoint();
if ($this->schedule?->
shouldRestart()) { unset($this->triggerHeap
);
$this->waitUntil =
new \
DateTimeImmutable('@0'
);
$this->schedule->
setRestart(false
);
} if (!
$this->waitUntil
||
$this->waitUntil >
($now =
$this->clock->
now()) || !
$checkpoint->
acquire($now) ) { return;
} $startTime =
$checkpoint->
from();
$lastTime =
$checkpoint->
time();