diff options
Diffstat (limited to 'server/lib/runners/runner.ts')
-rw-r--r-- | server/lib/runners/runner.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/runners/runner.ts b/server/lib/runners/runner.ts index 5478ab519..921cae6f2 100644 --- a/server/lib/runners/runner.ts +++ b/server/lib/runners/runner.ts | |||
@@ -3,6 +3,7 @@ import { retryTransactionWrapper } from '@server/helpers/database-utils' | |||
3 | import { logger, loggerTagsFactory } from '@server/helpers/logger' | 3 | import { logger, loggerTagsFactory } from '@server/helpers/logger' |
4 | import { sequelizeTypescript } from '@server/initializers/database' | 4 | import { sequelizeTypescript } from '@server/initializers/database' |
5 | import { MRunner } from '@server/types/models/runners' | 5 | import { MRunner } from '@server/types/models/runners' |
6 | import { RUNNER_JOBS } from '@server/initializers/constants' | ||
6 | 7 | ||
7 | const lTags = loggerTagsFactory('runner') | 8 | const lTags = loggerTagsFactory('runner') |
8 | 9 | ||
@@ -12,7 +13,7 @@ function updateLastRunnerContact (req: express.Request, runner: MRunner) { | |||
12 | const now = new Date() | 13 | const now = new Date() |
13 | 14 | ||
14 | // Don't update last runner contact too often | 15 | // Don't update last runner contact too often |
15 | if (now.getTime() - runner.lastContact.getTime() < 30000) return | 16 | if (now.getTime() - runner.lastContact.getTime() < RUNNER_JOBS.LAST_CONTACT_UPDATE_INTERVAL) return |
16 | if (updatingRunner.has(runner.id)) return | 17 | if (updatingRunner.has(runner.id)) return |
17 | 18 | ||
18 | updatingRunner.add(runner.id) | 19 | updatingRunner.add(runner.id) |