EventIndex: Start the crawler only if it's configured to start.

pull/21833/head
Damir Jelić 2019-11-26 13:31:16 +01:00
parent 47156351a6
commit 0132c3bbe3
2 changed files with 8 additions and 1 deletions

View File

@ -120,7 +120,9 @@ export default class EventIndex {
if (eventIndexWasEmpty) await addInitialCheckpoints();
// Start our crawler.
this.startCrawler();
if (SettingsStore.getValueAt(SettingLevel.DEVICE, 'enableCrawling')) {
this.startCrawler();
}
return;
}

View File

@ -490,5 +490,10 @@ export const SETTINGS = {
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
displayName: _td("How long should the crawler wait between requests"),
default: 3000,
},
"enableCrawling" : {
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
displayName: _td("How long should the crawler wait between requests"),
default: true,
}
};