Skip to content

Commit

Permalink
Merge pull request nextcloud#3599 from nextcloud/enh/time-insensitive…
Browse files Browse the repository at this point in the history
…-cron

Move DeleteCron to be time insensitive
  • Loading branch information
juliusknorr authored Feb 24, 2022
2 parents 8c33760 + e42ffa4 commit a1bd914
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Cron/CardDescriptionActivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 6 additions & 2 deletions lib/Cron/DeleteCron.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -43,6 +44,9 @@ public function __construct(BoardMapper $boardMapper, AttachmentService $attachm
$this->boardMapper = $boardMapper;
$this->attachmentService = $attachmentService;
$this->attachmentMapper = $attachmentMapper;

$this->setInterval(60 * 60 * 24);
$this->setTimeSensitivity(IJob::TIME_INSENSITIVE);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Cron/ScheduledNotifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a1bd914

Please sign in to comment.