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

Introduce experimental telemetry

This commit is contained in:
Chocobozzz 2022-07-05 15:43:21 +02:00
parent 15b43b214e
commit 630d0a1bf5
No known key found for this signature in database
GPG key ID: 583A612D890159BE
23 changed files with 1002 additions and 90 deletions

View file

@ -285,6 +285,12 @@ class JobQueue {
return total
}
async getStats () {
const promises = jobTypes.map(async t => ({ jobType: t, counts: await this.queues[t].getJobCounts() }))
return Promise.all(promises)
}
async removeOldJobs () {
for (const key of Object.keys(this.queues)) {
const queue = this.queues[key]