This commit is contained in:
parent
fe94f0d33c
commit
b5b9e62cd5
@ -185,9 +185,9 @@ module.exports = async (client, apex, app) => {
|
|||||||
scanReturn = async () => {
|
scanReturn = async () => {
|
||||||
app.locals.scannum = 0
|
app.locals.scannum = 0
|
||||||
if (servers?.length > 0) {
|
if (servers?.length > 0) {
|
||||||
await scan(servers.shift())
|
return await scan(servers.shift())
|
||||||
} else {
|
} else {
|
||||||
await scan(constant.initialscan)
|
return await scan(constant.initialscan)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scan = async server => {
|
scan = async server => {
|
||||||
@ -233,11 +233,11 @@ module.exports = async (client, apex, app) => {
|
|||||||
return await scanReturn()
|
return await scanReturn()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return scanReturn()
|
return await scanReturn()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
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)
|
||||||
})
|
})
|
||||||
return scanReturn()
|
return await scanReturn()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user