Merge pull request #17817 from nextcloud/disable-background-scan-option
add option to disable background scanning of files
This commit is contained in:
commit
5090a68deb
1 changed files with 4 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue