mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03:00
Settings: Remove the crawler sleep time setting.
This commit is contained in:
parent
4953f32cba
commit
947ea9823d
3 changed files with 2 additions and 22 deletions
|
@ -46,8 +46,6 @@ export default class ManageEventIndex extends React.Component {
|
|||
currentRoom: null,
|
||||
eventIndexingEnabled:
|
||||
SettingsStore.getValueAt(SettingLevel.DEVICE, 'enableEventIndexing'),
|
||||
crawlerSleepTime:
|
||||
SettingsStore.getValueAt(SettingLevel.DEVICE, 'crawlerSleepTime'),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -102,20 +100,6 @@ export default class ManageEventIndex extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
_onEventIndexingEnabledChange = (checked) => {
|
||||
SettingsStore.setValue("enableCrawling", null, SettingLevel.DEVICE, checked);
|
||||
|
||||
if (checked) EventIndexPeg.start();
|
||||
else EventIndexPeg.stop();
|
||||
|
||||
this.setState({eventIndexingEnabled: checked});
|
||||
}
|
||||
|
||||
_onCrawlerSleepTimeChange = (e) => {
|
||||
this.setState({crawlerSleepTime: e.target.value});
|
||||
SettingsStore.setValue("crawlerSleepTime", null, SettingLevel.DEVICE, e.target.value);
|
||||
}
|
||||
|
||||
_onDisable = async () => {
|
||||
this.props.onFinished(false);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -486,11 +486,6 @@ export const SETTINGS = {
|
|||
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
||||
default: RIGHT_PANEL_PHASES.GroupMemberList,
|
||||
},
|
||||
"crawlerSleepTime": {
|
||||
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
||||
displayName: _td("How long should the crawler wait between requests"),
|
||||
default: 3000,
|
||||
},
|
||||
"enableEventIndexing": {
|
||||
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
||||
displayName: _td("Enable message search in encrypted rooms"),
|
||||
|
|
Loading…
Reference in a new issue