diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-06 16:02:11 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:17 +0200 |
commit | 883a9019085ff9013079d6b1539b86f2f519175a (patch) | |
tree | bf1f68340ee4b482f880753bdd4658e91aff8335 /shared/extra-utils/server/jobs.ts | |
parent | a9c58393d36d221197b48884a1960e6126ab31d7 (diff) | |
download | PeerTube-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.ts | 9 |
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 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | 2 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' |
3 | import { getDebug, makeGetRequest } from '../../../shared/extra-utils' | 3 | import { makeGetRequest } from '../../../shared/extra-utils' |
4 | import { Job, JobState, JobType, ServerDebug } from '../../models' | 4 | import { Job, JobState, JobType } from '../../models' |
5 | import { wait } from '../miscs/miscs' | 5 | import { wait } from '../miscs/miscs' |
6 | import { ServerInfo } from './servers' | 6 | import { 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 | } |