mirror of https://github.com/vector-im/riot-web
EventIndexing: Move the max events per crawl constant into the class.
parent
368a77ec3e
commit
d4b31cb7e0
|
@ -26,6 +26,9 @@ export default class EventIndexer {
|
||||||
// The time that the crawler will wait between /rooms/{room_id}/messages
|
// The time that the crawler will wait between /rooms/{room_id}/messages
|
||||||
// requests
|
// requests
|
||||||
this._crawlerTimeout = 3000;
|
this._crawlerTimeout = 3000;
|
||||||
|
// The maximum number of events our crawler should fetch in a single
|
||||||
|
// crawl.
|
||||||
|
this._eventsPerCrawl = 100;
|
||||||
this._crawlerRef = null;
|
this._crawlerRef = null;
|
||||||
this.liveEventsForIndex = new Set();
|
this.liveEventsForIndex = new Set();
|
||||||
}
|
}
|
||||||
|
@ -218,7 +221,7 @@ export default class EventIndexer {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
res = await client._createMessagesRequest(
|
res = await client._createMessagesRequest(
|
||||||
checkpoint.roomId, checkpoint.token, 100,
|
checkpoint.roomId, checkpoint.token, this._eventsPerCrawl,
|
||||||
checkpoint.direction);
|
checkpoint.direction);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("EventIndex: Error crawling events:", e);
|
console.log("EventIndex: Error crawling events:", e);
|
||||||
|
|
Loading…
Reference in New Issue