1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Try to speed up server tests

This commit is contained in:
Chocobozzz 2021-02-18 14:44:12 +01:00 committed by Chocobozzz
parent 3f8ae0e4e4
commit fae6e4da8f
11 changed files with 121 additions and 61 deletions

View file

@ -35,7 +35,7 @@ class InboxManager {
})
setInterval(() => {
StatsManager.Instance.updateInboxStats(this.messagesProcessed, this.inboxQueue.length())
StatsManager.Instance.updateInboxStats(this.messagesProcessed, this.getActivityPubMessagesWaiting())
}, SCHEDULER_INTERVALS_MS.updateInboxStats)
}
@ -44,6 +44,10 @@ class InboxManager {
.catch(err => logger.error('Cannot add options in inbox queue.', { options, err }))
}
getActivityPubMessagesWaiting () {
return this.inboxQueue.length() + this.inboxQueue.running()
}
static get Instance () {
return this.instance || (this.instance = new this())
}