Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Oct 20, 2023
1 parent 67b85b7 commit 2c15555
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/page-update-notifier/src/PageUpdateNotifier.php
Expand Up @@ -143,6 +143,8 @@ public function run(PageInterface $page): int|string
$cache = $this->getCacheFilePath();
$lastTime = new LastTime($cache);
if ($lastTime->wasRunSince(new \DateInterval($this->interval))) {
$this->logger?->info('[PageUpdateNotifier] was ever run since interval');

return self::WAS_EVER_RUN_SINCE_INTERVAL;
}

Expand All @@ -153,6 +155,8 @@ public function run(PageInterface $page): int|string
$pages = $this->getPageUpdatedSince($lastTime30min);
// dd($pages);
if ([] === $pages) {
$this->logger?->info('[PageUpdateNotifier] Nothing to notify');

return self::NOTHING_TO_NOTIFY;
}

Expand Down

0 comments on commit 2c15555

Please sign in to comment.