summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-11-06 09:55:36 +0100
committerGitHub <noreply@github.com>2019-11-06 09:55:36 +0100
commit5090a68deb2951c8c847df43ae6de017460ad7da (patch)
tree67fada9445fa3b24ea07f9b7e7c94e285a761824 /apps
parent3a3ed95b5929be5edc13efc3cd32c3264cbf7fcb (diff)
parent5b2af1cb82a7d1d67e57e930ca849c266128ba5c (diff)
downloadnextcloud-server-5090a68deb2951c8c847df43ae6de017460ad7da.tar.gz
nextcloud-server-5090a68deb2951c8c847df43ae6de017460ad7da.zip
Merge pull request #17817 from nextcloud/disable-background-scan-option
add option to disable background scanning of files
Diffstat (limited to 'apps')
-rw-r--r--apps/files/lib/BackgroundJob/ScanFiles.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files/lib/BackgroundJob/ScanFiles.php b/apps/files/lib/BackgroundJob/ScanFiles.php
index cb2b9d4b1c9..04ba8524131 100644
--- a/apps/files/lib/BackgroundJob/ScanFiles.php
+++ b/apps/files/lib/BackgroundJob/ScanFiles.php
@@ -97,6 +97,10 @@ class ScanFiles extends \OC\BackgroundJob\TimedJob {
* @throws \Exception
*/
protected function run($argument) {
+ if ($this->config->getSystemValueBool('files_no_background_scan', false)) {
+ return;
+ }
+
$offset = $this->config->getAppValue('files', 'cronjob_scan_files', 0);
$users = $this->userManager->search('', self::USERS_PER_SESSION, $offset);
if (!count($users)) {