From 6581f577be792061d823689113b703d56d6b1119 Mon Sep 17 00:00:00 2001 From: ale Date: Mon, 14 Oct 2024 20:57:59 +0200 Subject: [PATCH] taskdeletedup --- lib/fediblock.js | 1 + lib/taskdeletedup.js | 2 +- server.js | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/fediblock.js b/lib/fediblock.js index 5c9e56d..3da5f81 100644 --- a/lib/fediblock.js +++ b/lib/fediblock.js @@ -238,4 +238,5 @@ module.exports = async (client, apex, app) => { job = schedule.scheduleJob('0 ' + constant.schedule + ' * * *', async () => { await util.sendFederatedMessage(constant.nick, null, 'Scanning ' + app.locals.server + ' instance with ' + app.locals.scantotal + ' peers\nScanned ' + app.locals.peers + ' peers from ' + app.locals.instances + ' instances, ' + app.locals.created + ' created, ' + app.locals.updated + ' updated\nhttps://' + constant.apexdomain) }) + await scanReturn() } diff --git a/lib/taskdeletedup.js b/lib/taskdeletedup.js index eeac679..dd0853f 100644 --- a/lib/taskdeletedup.js +++ b/lib/taskdeletedup.js @@ -44,7 +44,7 @@ module.exports = client => { break } } while (result.hits && result.hits.hits && result.hits.hits.length > 0) - return console.log('Index: ' + constant.index + ' - Total: ' + count.total + ' - Deleted: ' + count.deleted) + console.log('Index: ' + constant.index + ' - Total: ' + count.total + ' - Deleted: ' + count.deleted) }, job = schedule.scheduleJob('0 ' + constant.taskdeletedup + ' * * *', async () => { await deleteDup() diff --git a/server.js b/server.js index b311c58..fc8bba0 100644 --- a/server.js +++ b/server.js @@ -107,10 +107,9 @@ const apexinstance = require('./lib/apex'), } else { apex.systemUser = admin } - const fediblockscan = await fediblock(client, apex, app) taskdeletedup(client) await apex.startDelivery() - await fediblockscan.scanReturn() + await fediblock(client, apex, app) console.log('Server listening on ' + server.address().address + ':' + server.address().port) } catch (e) { console.error(e)