taskdeletedup
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
ale 2024-10-14 20:57:59 +02:00
parent 0c1b38b7e2
commit 6581f577be
3 changed files with 3 additions and 3 deletions

View File

@ -238,4 +238,5 @@ module.exports = async (client, apex, app) => {
job = schedule.scheduleJob('0 ' + constant.schedule + ' * * *', async () => { 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 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()
} }

View File

@ -44,7 +44,7 @@ module.exports = client => {
break break
} }
} while (result.hits && result.hits.hits && result.hits.hits.length > 0) } 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 () => { job = schedule.scheduleJob('0 ' + constant.taskdeletedup + ' * * *', async () => {
await deleteDup() await deleteDup()

View File

@ -107,10 +107,9 @@ const apexinstance = require('./lib/apex'),
} else { } else {
apex.systemUser = admin apex.systemUser = admin
} }
const fediblockscan = await fediblock(client, apex, app)
taskdeletedup(client) taskdeletedup(client)
await apex.startDelivery() await apex.startDelivery()
await fediblockscan.scanReturn() await fediblock(client, apex, app)
console.log('Server listening on ' + server.address().address + ':' + server.address().port) console.log('Server listening on ' + server.address().address + ':' + server.address().port)
} catch (e) { } catch (e) {
console.error(e) console.error(e)