Skip to content

Commit

Permalink
Use the new option to signaling insensitivity
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Feb 22, 2022
1 parent ba0134c commit 714a5b7
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/contactsinteraction/lib/BackgroundJob/CleanupJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

use OCA\ContactsInteraction\Db\RecentContactMapper;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\TimedJob;

class CleanupJob extends TimedJob {
Expand All @@ -38,7 +39,8 @@ public function __construct(ITimeFactory $time,
RecentContactMapper $mapper) {
parent::__construct($time);

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

$this->mapper = $mapper;
}
Expand Down
2 changes: 2 additions & 0 deletions apps/dav/lib/BackgroundJob/UploadCleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

use OC\User\NoUserException;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\IJobList;
use OCP\BackgroundJob\TimedJob;
use OCP\Files\File;
Expand All @@ -51,6 +52,7 @@ public function __construct(ITimeFactory $time, IRootFolder $rootFolder, IJobLis

// Run once a day
$this->setInterval(60 * 60 * 24);
$this->setTimeSensitivity(IJob::TIME_INSENSITIVE);
}

protected function run($argument) {
Expand Down
2 changes: 2 additions & 0 deletions apps/files_external/lib/BackgroundJob/CredentialsCleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Service\UserGlobalStoragesService;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\TimedJob;
use OCP\Security\ICredentialsManager;
use OCP\IUser;
Expand All @@ -53,6 +54,7 @@ public function __construct(

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

protected function run($argument) {
Expand Down
2 changes: 2 additions & 0 deletions apps/files_sharing/lib/ExpireSharesJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
namespace OCA\Files_Sharing;

use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\TimedJob;
use OCP\IDBConnection;
use OCP\Share\Exceptions\ShareNotFound;
Expand All @@ -50,6 +51,7 @@ public function __construct(ITimeFactory $time, IManager $shareManager, IDBConne

// Run once a day
$this->setInterval(24 * 60 * 60);
$this->setTimeSensitivity(IJob::TIME_INSENSITIVE);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Authentication\TwoFactorAuth\IRegistry;
use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\IJobList;
use OCP\BackgroundJob\TimedJob;
use OCP\IUserManager;
Expand Down Expand Up @@ -60,6 +61,7 @@ public function __construct(IRegistry $registry,
$this->jobList = $jobList;

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

protected function run($argument) {
Expand Down
2 changes: 2 additions & 0 deletions lib/private/Security/Bruteforce/CleanupJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
namespace OC\Security\Bruteforce;

use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\TimedJob;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
Expand All @@ -41,6 +42,7 @@ public function __construct(ITimeFactory $time, IDBConnection $connection) {

// Run once a day
$this->setInterval(3600 * 24);
$this->setTimeSensitivity(IJob::TIME_INSENSITIVE);
}

protected function run($argument) {
Expand Down

0 comments on commit 714a5b7

Please sign in to comment.