Node.js based forum software built for the modern web
fix: closes #13180, don't execute cron jobs if ap disabled
Barış Soner Uşaklıa410587ce1ee
diff --git a/src/activitypub/index.js b/src/activitypub/index.jsindex 1ab36c3773..eb60b7a1a6 100644--- a/src/activitypub/index.js+++ b/src/activitypub/index.js@@ -59,6 +59,9 @@ ActivityPub.instances = require('./instances');ActivityPub.startJobs = () => {ActivityPub.helpers.log('[activitypub/jobs] Registering jobs.');new CronJob('0 0 * * *', async () => {+ if (!meta.config.activitypubEnabled) {+ return;+ }try {await ActivityPub.notes.prune();await db.sortedSetsRemoveRangeByScore(['activities:datetime'], '-inf', Date.now() - 604800000);@@ -68,6 +71,9 @@ ActivityPub.startJobs = () => {}, null, true, null, null, false); // change last argument to true for debuggingnew CronJob('*/30 * * * *', async () => {+ if (!meta.config.activitypubEnabled) {+ return;+ }try {await ActivityPub.actors.prune();} catch (err) {