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>
This commit is contained in:
parent
5b5b451719
commit
5b2af1cb82
|
@ -97,6 +97,10 @@ class ScanFiles extends \OC\BackgroundJob\TimedJob {
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
protected function run($argument) {
|
protected function run($argument) {
|
||||||
|
if ($this->config->getSystemValueBool('files_no_background_scan', false)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$offset = $this->config->getAppValue('files', 'cronjob_scan_files', 0);
|
$offset = $this->config->getAppValue('files', 'cronjob_scan_files', 0);
|
||||||
$users = $this->userManager->search('', self::USERS_PER_SESSION, $offset);
|
$users = $this->userManager->search('', self::USERS_PER_SESSION, $offset);
|
||||||
if (!count($users)) {
|
if (!count($users)) {
|
||||||
|
|
Loading…
Reference in New Issue