Ver código fonte

Reduce pending job waiting

tags/v3.2.0-rc.1
Chocobozzz Chocobozzz 1 ano atrás
pai
commit
4b91bc1525
2 arquivos alterados com 3 adições e 3 exclusões
  1. +1
    -1
      .github/workflows/test.yml
  2. +2
    -2
      shared/extra-utils/server/jobs.ts

+ 1
- 1
.github/workflows/test.yml Ver arquivo

@@ -44,7 +44,7 @@ jobs:
env:
PGUSER: peertube
PGHOST: localhost
NODE_PENDING_JOB_WAIT: 500
NODE_PENDING_JOB_WAIT: 250

steps:
- uses: actions/checkout@v2


+ 2
- 2
shared/extra-utils/server/jobs.ts Ver arquivo

@@ -55,7 +55,7 @@ function getJobsListPaginationAndSort (options: {
async function waitJobs (serversArg: ServerInfo[] | ServerInfo) {
const pendingJobWait = process.env.NODE_PENDING_JOB_WAIT
? parseInt(process.env.NODE_PENDING_JOB_WAIT, 10)
: 500
: 250

let servers: ServerInfo[]

@@ -115,7 +115,7 @@ async function waitJobs (serversArg: ServerInfo[] | ServerInfo) {
}

if (pendingRequests) {
await wait(1000)
await wait(pendingJobWait)
}
} while (pendingRequests)
}


Carregando…
Cancelar
Salvar