Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2022-03-10 16:53:53 +0300
committerGitHub <noreply@github.com>2022-03-10 16:53:53 +0300
commitda4cd47753b954ed8f6a00a873ab1210bfcf9f24 (patch)
tree0fe31e46c09ec731b8fae8942cb68e346bc59a1e /apps
parent06600f60365c84c39a96d84afabc2a9ec98e9312 (diff)
parent557afa7c1a51f13beb5591ffd86ee7aecae394a4 (diff)
Merge pull request #31122 from nextcloud/backport/30945/stable22
[stable22] Background job time windows
Diffstat (limited to 'apps')
-rw-r--r--apps/contactsinteraction/lib/BackgroundJob/CleanupJob.php4
-rw-r--r--apps/dav/lib/BackgroundJob/UploadCleanup.php2
-rw-r--r--apps/files_external/lib/BackgroundJob/CredentialsCleanup.php2
-rw-r--r--apps/files_sharing/lib/ExpireSharesJob.php2
-rw-r--r--apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php2
5 files changed, 11 insertions, 1 deletions
diff --git a/apps/contactsinteraction/lib/BackgroundJob/CleanupJob.php b/apps/contactsinteraction/lib/BackgroundJob/CleanupJob.php
index 2a48452d426..fd370ce60e5 100644
--- a/apps/contactsinteraction/lib/BackgroundJob/CleanupJob.php
+++ b/apps/contactsinteraction/lib/BackgroundJob/CleanupJob.php
@@ -27,6 +27,7 @@ namespace OCA\ContactsInteraction\BackgroundJob;
use OCA\ContactsInteraction\Db\RecentContactMapper;
use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\TimedJob;
class CleanupJob extends TimedJob {
@@ -38,7 +39,8 @@ class CleanupJob extends TimedJob {
RecentContactMapper $mapper) {
parent::__construct($time);
- $this->setInterval(12 * 60 * 60);
+ $this->setInterval(24 * 60 * 60);
+ $this->setTimeSensitivity(IJob::TIME_INSENSITIVE);
$this->mapper = $mapper;
}
diff --git a/apps/dav/lib/BackgroundJob/UploadCleanup.php b/apps/dav/lib/BackgroundJob/UploadCleanup.php
index 70f4d6b9565..76906becb54 100644
--- a/apps/dav/lib/BackgroundJob/UploadCleanup.php
+++ b/apps/dav/lib/BackgroundJob/UploadCleanup.php
@@ -29,6 +29,7 @@ namespace OCA\DAV\BackgroundJob;
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;
@@ -51,6 +52,7 @@ class UploadCleanup extends TimedJob {
// Run once a day
$this->setInterval(60 * 60 * 24);
+ $this->setTimeSensitivity(IJob::TIME_INSENSITIVE);
}
protected function run($argument) {
diff --git a/apps/files_external/lib/BackgroundJob/CredentialsCleanup.php b/apps/files_external/lib/BackgroundJob/CredentialsCleanup.php
index 07b66e2ecb6..138d4d7de2d 100644
--- a/apps/files_external/lib/BackgroundJob/CredentialsCleanup.php
+++ b/apps/files_external/lib/BackgroundJob/CredentialsCleanup.php
@@ -29,6 +29,7 @@ use OCA\Files_External\Lib\Auth\Password\LoginCredentials;
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;
@@ -53,6 +54,7 @@ class CredentialsCleanup extends TimedJob {
// run every day
$this->setInterval(24 * 60 * 60);
+ $this->setTimeSensitivity(IJob::TIME_INSENSITIVE);
}
protected function run($argument) {
diff --git a/apps/files_sharing/lib/ExpireSharesJob.php b/apps/files_sharing/lib/ExpireSharesJob.php
index 1e56602a0bf..dd0979e4b0b 100644
--- a/apps/files_sharing/lib/ExpireSharesJob.php
+++ b/apps/files_sharing/lib/ExpireSharesJob.php
@@ -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;
@@ -50,6 +51,7 @@ class ExpireSharesJob extends TimedJob {
// Run once a day
$this->setInterval(24 * 60 * 60);
+ $this->setTimeSensitivity(IJob::TIME_INSENSITIVE);
}
diff --git a/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php b/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php
index 51428f9b996..3eed1bb8dea 100644
--- a/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php
+++ b/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php
@@ -28,6 +28,7 @@ namespace OCA\TwoFactorBackupCodes\BackgroundJob;
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;
@@ -60,6 +61,7 @@ class RememberBackupCodesJob extends TimedJob {
$this->jobList = $jobList;
$this->setInterval(60 * 60 * 24 * 14);
+ $this->setTimeSensitivity(IJob::TIME_INSENSITIVE);
}
protected function run($argument) {