diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-03-04 13:45:19 +0300 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2022-03-04 13:45:19 +0300 |
commit | 8d83b6a4fdf51355bc2c9ec6649fece2f8b392d0 (patch) | |
tree | 2f26fb2ff1a9005649b734aaab2d3c296e6ec934 | |
parent | 0941ccb2b8a84822f644097de670c9901a763cd4 (diff) |
Make crawler time insensitive
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
-rw-r--r-- | lib/Cron/Crawler.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Cron/Crawler.php b/lib/Cron/Crawler.php index 301a2c3..49ac07c 100644 --- a/lib/Cron/Crawler.php +++ b/lib/Cron/Crawler.php @@ -24,6 +24,7 @@ namespace OCA\NextcloudAnnouncements\Cron; use OCA\NextcloudAnnouncements\Notification\Notifier; use OCP\AppFramework\Http; use OCP\AppFramework\Utility\ITimeFactory; +use OCP\BackgroundJob\IJob; use OCP\BackgroundJob\TimedJob; use OCP\Http\Client\IClientService; use OCP\IConfig; @@ -69,6 +70,7 @@ class Crawler extends TimedJob { $interval += random_int(0, 60) * 60; $this->setInterval($interval); + $this->setTimeSensitivity(IJob::TIME_INSENSITIVE); } |