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)