Merge pull request #3599 from nextcloud/enh/time-insensitive-cron

Move DeleteCron to be time insensitive
This commit is contained in:
Julius Härtl
2022-02-24 16:16:52 +01:00
committed by GitHub
3 changed files with 8 additions and 4 deletions

View File

@@ -24,7 +24,7 @@
namespace OCA\Deck\Cron;
use OC\BackgroundJob\Job;
use OCP\BackgroundJob\Job;
use OCA\Deck\Activity\ActivityManager;
use OCA\Deck\Db\CardMapper;

View File

@@ -24,13 +24,14 @@
namespace OCA\Deck\Cron;
use OC\BackgroundJob\Job;
use OCP\BackgroundJob\TimedJob;
use OCA\Deck\Db\AttachmentMapper;
use OCA\Deck\Db\BoardMapper;
use OCA\Deck\InvalidAttachmentType;
use OCA\Deck\Service\AttachmentService;
use OCP\BackgroundJob\IJob;
class DeleteCron extends Job {
class DeleteCron extends TimedJob {
/** @var BoardMapper */
private $boardMapper;
@@ -43,6 +44,9 @@ class DeleteCron extends Job {
$this->boardMapper = $boardMapper;
$this->attachmentService = $attachmentService;
$this->attachmentMapper = $attachmentMapper;
$this->setInterval(60 * 60 * 24);
$this->setTimeSensitivity(IJob::TIME_INSENSITIVE);
}
/**

View File

@@ -23,7 +23,7 @@
namespace OCA\Deck\Cron;
use OC\BackgroundJob\Job;
use OCP\BackgroundJob\Job;
use OCA\Deck\Db\Card;
use OCA\Deck\Db\CardMapper;
use OCA\Deck\Notification\NotificationHelper;