summaryrefslogtreecommitdiffstats
path: root/apps/files/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2019-11-05 13:17:05 +0100
committerRobin Appelman <robin@icewind.nl>2019-11-05 13:17:05 +0100
commit5b2af1cb82a7d1d67e57e930ca849c266128ba5c (patch)
treec180a43d204e6a6effdf2a0a4172c303d037decb /apps/files/lib
parent5b5b4517194f7ca7d7bfe86903493271e4e18d10 (diff)
downloadnextcloud-server-5b2af1cb82a7d1d67e57e930ca849c266128ba5c.tar.gz
nextcloud-server-5b2af1cb82a7d1d67e57e930ca849c266128ba5c.zip
add option to disable background scanning of files
when using (only) object store this job doesn't do any scanning anyway, but all the setup can still be expensive on large setups Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files/lib')
-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)) {