aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server/jobs.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-06 16:02:11 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commit883a9019085ff9013079d6b1539b86f2f519175a (patch)
treebf1f68340ee4b482f880753bdd4658e91aff8335 /shared/extra-utils/server/jobs.ts
parenta9c58393d36d221197b48884a1960e6126ab31d7 (diff)
downloadPeerTube-883a9019085ff9013079d6b1539b86f2f519175a.tar.gz
PeerTube-883a9019085ff9013079d6b1539b86f2f519175a.tar.zst
PeerTube-883a9019085ff9013079d6b1539b86f2f519175a.zip
Introduce debug command
Diffstat (limited to 'shared/extra-utils/server/jobs.ts')
-rw-r--r--shared/extra-utils/server/jobs.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/shared/extra-utils/server/jobs.ts b/shared/extra-utils/server/jobs.ts
index 763374e03..a3683913a 100644
--- a/shared/extra-utils/server/jobs.ts
+++ b/shared/extra-utils/server/jobs.ts
@@ -1,7 +1,7 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' 2import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
3import { getDebug, makeGetRequest } from '../../../shared/extra-utils' 3import { makeGetRequest } from '../../../shared/extra-utils'
4import { Job, JobState, JobType, ServerDebug } from '../../models' 4import { Job, JobState, JobType } from '../../models'
5import { wait } from '../miscs/miscs' 5import { wait } from '../miscs/miscs'
6import { ServerInfo } from './servers' 6import { ServerInfo } from './servers'
7 7
@@ -90,9 +90,8 @@ async function waitJobs (serversArg: ServerInfo[] | ServerInfo) {
90 tasks.push(p) 90 tasks.push(p)
91 } 91 }
92 92
93 const p = getDebug(server.url, server.accessToken) 93 const p = server.debugCommand.getDebug()
94 .then(res => res.body) 94 .then(obj => {
95 .then((obj: ServerDebug) => {
96 if (obj.activityPubMessagesWaiting !== 0) { 95 if (obj.activityPubMessagesWaiting !== 0) {
97 pendingRequests = true 96 pendingRequests = true
98 } 97 }