Fix event watcher lol
This commit is contained in:
parent
aca40de484
commit
94ab821fdb
|
@ -16,8 +16,6 @@ async function getLastEventIndex() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getLastEventIndex();
|
|
||||||
|
|
||||||
async function fetchEvents() {
|
async function fetchEvents() {
|
||||||
try {
|
try {
|
||||||
const events = await db.query('SELECT * FROM Events WHERE EventIndex > ? ORDER BY EventIndex ASC', [lastEventIndex]);
|
const events = await db.query('SELECT * FROM Events WHERE EventIndex > ? ORDER BY EventIndex ASC', [lastEventIndex]);
|
||||||
|
@ -37,7 +35,6 @@ async function fetchEvents() {
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
await getLastEventIndex();
|
await getLastEventIndex();
|
||||||
log.info("Event watcher started.");
|
|
||||||
await fetchEvents();
|
await fetchEvents();
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue