Node.js based forum software built for the modern web
catch errors from handleExpired
Barış Soner Uşaklı06226081d4fc
diff --git a/src/topics/scheduled.js b/src/topics/scheduled.jsindex 129f4113f3..5033bd610a 100644--- a/src/topics/scheduled.js+++ b/src/topics/scheduled.js@@ -17,7 +17,13 @@ const Scheduled = module.exports;Scheduled.startJobs = function () {winston.verbose('[scheduled topics] Starting jobs.');- new CronJob('*/1 * * * *', Scheduled.handleExpired, null, true);+ new CronJob('*/1 * * * *', async () => {+ try {+ await Scheduled.handleExpired();+ } catch (err) {+ winston.error(err.stack);+ }+ }, null, true);};Scheduled.handleExpired = async function () {