EventIndexing: Rename the stop method.
parent
d911055f5d
commit
ecbc47c548
|
@ -57,13 +57,14 @@ class EventIndexPeg {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
async stop() {
|
stop() {
|
||||||
if (this.index == null) return;
|
if (this.index === null) return;
|
||||||
index.stopCrawler();
|
index.stop();
|
||||||
|
this.index = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
async deleteEventIndex() {
|
async deleteEventIndex() {
|
||||||
if (this.index == null) return;
|
if (this.index === null) return;
|
||||||
index.deleteEventIndex();
|
index.deleteEventIndex();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ export default class EventIndexer {
|
||||||
const platform = PlatformPeg.get();
|
const platform = PlatformPeg.get();
|
||||||
if (!platform.supportsEventIndexing()) return false;
|
if (!platform.supportsEventIndexing()) return false;
|
||||||
platform.initEventIndex(userId);
|
platform.initEventIndex(userId);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async onSync(state, prevState, data) {
|
async onSync(state, prevState, data) {
|
||||||
|
@ -397,7 +398,7 @@ export default class EventIndexer {
|
||||||
this.crawlerRef = crawlerHandle;
|
this.crawlerRef = crawlerHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
stopCrawler() {
|
stop() {
|
||||||
this._crawlerRef.cancel();
|
this._crawlerRef.cancel();
|
||||||
this._crawlerRef = null;
|
this._crawlerRef = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue