From afde952c10bdc5438345944b78ab521db52d5602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 24 May 2023 21:22:36 +0200 Subject: [PATCH] Fix incompatibility with 32-bit platforms --- internal/manager/persistence/jobs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/manager/persistence/jobs.go b/internal/manager/persistence/jobs.go index 0ce1ecf8..66b9e0fa 100644 --- a/internal/manager/persistence/jobs.go +++ b/internal/manager/persistence/jobs.go @@ -600,9 +600,9 @@ func (db *DB) AddWorkerToTaskFailedList(ctx context.Context, t *Task, w *Worker) // Integer literals are of type `int`, so that's just a bit nicer to work with // than `int64`. - if numFailed64 > math.MaxUint32 { + if numFailed64 > math.MaxInt32 { log.Warn().Int64("numFailed", numFailed64).Msg("number of failed workers is crazy high, something is wrong here") - return math.MaxUint32, tx.Error + return math.MaxInt32, tx.Error } return int(numFailed64), tx.Error }