Settings: Remove the crawler sleep time setting.

This commit is contained in:
Damir Jelić 2020-01-23 13:32:27 +01:00
parent 4953f32cba
commit 947ea9823d
3 changed files with 2 additions and 22 deletions

View file

@ -30,6 +30,7 @@ export default class EventIndex {
// The time in ms that the crawler will wait loop iterations if there
// have not been any checkpoints to consume in the last iteration.
this._crawlerIdleTime = 5000;
this._crawlerSleepTime = 3000;
// The maximum number of events our crawler should fetch in a single
// crawl.
this._eventsPerCrawl = 100;
@ -211,7 +212,7 @@ export default class EventIndex {
// This is a low priority task and we don't want to spam our
// homeserver with /messages requests so we set a hefty timeout
// here.
let sleepTime = SettingsStore.getValueAt(SettingLevel.DEVICE, 'crawlerSleepTime');
let sleepTime = this._crawlerSleepTime;
// Don't let the user configure a lower sleep time than 100 ms.
sleepTime = Math.max(sleepTime, 100);