From e901579b00fbcd8fc0f7b45fd841636329148a34 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 17 May 2023 16:42:57 +0200 Subject: Fix tests --- server/lib/runners/runner.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/lib') 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' import { logger, loggerTagsFactory } from '@server/helpers/logger' import { sequelizeTypescript } from '@server/initializers/database' import { MRunner } from '@server/types/models/runners' +import { RUNNER_JOBS } from '@server/initializers/constants' const lTags = loggerTagsFactory('runner') @@ -12,7 +13,7 @@ function updateLastRunnerContact (req: express.Request, runner: MRunner) { const now = new Date() // Don't update last runner contact too often - if (now.getTime() - runner.lastContact.getTime() < 30000) return + if (now.getTime() - runner.lastContact.getTime() < RUNNER_JOBS.LAST_CONTACT_UPDATE_INTERVAL) return if (updatingRunner.has(runner.id)) return updatingRunner.add(runner.id) -- cgit v1.2.3