MatrixChat: Add more detailed logging to the event crawler.

pull/21833/head
Damir Jelić 2019-10-18 16:31:39 +02:00
parent 3f53691834
commit 1b63886a6b
1 changed files with 5 additions and 0 deletions

View File

@ -2101,7 +2101,10 @@ export default createReactClass({
// here.
await sleep(3000);
console.log("Seshat: Running the crawler loop.");
if (cancelled) {
console.log("Seshat: Cancelling the crawler.");
break;
}
@ -2124,6 +2127,7 @@ export default createReactClass({
checkpoint.token, 100, checkpoint.direction);
if (res.chunk.length === 0) {
console.log("Seshat: Done with the checkpoint", checkpoint)
// We got to the start/end of our timeline, lets just
// delete our checkpoint and go back to sleep.
await platform.removeCrawlerCheckpoint(checkpoint);
@ -2223,6 +2227,7 @@ export default createReactClass({
// Let us delete the checkpoint in that case, otherwise push
// the new checkpoint to be used by the crawler.
if (eventsAlreadyAdded === true && newCheckpoint.fullCrawl !== true) {
console.log("Seshat: Checkpoint had already all events added, stopping the crawl", checkpoint);
await platform.removeCrawlerCheckpoint(newCheckpoint);
} else {
this.crawlerChekpoints.push(newCheckpoint);