fix: exit on errors

This commit is contained in:
2018-11-02 16:35:26 -07:00
parent 024a43e20b
commit f7523ae5e2

View File

@@ -42,7 +42,7 @@ async function run() {
// scheduled running // scheduled running
if (interval === 0) return; if (interval === 0) return;
logger.debug(`Starting interval (${interval}s)...`); logger.debug(`Starting interval (${interval}s)...`);
runInterval(fetchAndIndex, interval * 1000); runInterval(() => fetchAndIndex().catch(handleError), interval * 1000);
} }
run().catch(handleError); run().catch(handleError);