diff options
Diffstat (limited to 'packages/peertube-runner/server')
-rw-r--r-- | packages/peertube-runner/server/server.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/peertube-runner/server/server.ts b/packages/peertube-runner/server/server.ts index cb1533dc6..087405dfe 100644 --- a/packages/peertube-runner/server/server.ts +++ b/packages/peertube-runner/server/server.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { ensureDir, readdir, remove } from 'fs-extra' | 1 | import { ensureDir, readdir, remove } from 'fs-extra' |
2 | import { join } from 'path' | 2 | import { join } from 'path' |
3 | import { io, Socket } from 'socket.io-client' | 3 | import { io, Socket } from 'socket.io-client' |
4 | import { pick } from '@shared/core-utils' | 4 | import { pick, wait } from '@shared/core-utils' |
5 | import { PeerTubeProblemDocument, ServerErrorCode } from '@shared/models' | 5 | import { PeerTubeProblemDocument, ServerErrorCode } from '@shared/models' |
6 | import { PeerTubeServer as PeerTubeServerCommand } from '@shared/server-commands' | 6 | import { PeerTubeServer as PeerTubeServerCommand } from '@shared/server-commands' |
7 | import { ConfigManager } from '../shared' | 7 | import { ConfigManager } from '../shared' |
@@ -206,6 +206,8 @@ export class RunnerServer { | |||
206 | this.checkingAvailableJobs = false | 206 | this.checkingAvailableJobs = false |
207 | 207 | ||
208 | if (hadAvailableJob && this.canProcessMoreJobs()) { | 208 | if (hadAvailableJob && this.canProcessMoreJobs()) { |
209 | await wait(2500) | ||
210 | |||
209 | this.checkAvailableJobs() | 211 | this.checkAvailableJobs() |
210 | .catch(err => logger.error({ err }, 'Cannot check more available jobs')) | 212 | .catch(err => logger.error({ err }, 'Cannot check more available jobs')) |
211 | } | 213 | } |