From 834d94ab398b6619a08f5384dbe42ad3790b752a Mon Sep 17 00:00:00 2001 From: Domendra Singh Komra <142248999+azadDsync@users.noreply.github.com> Date: Thu, 24 Oct 2024 15:44:23 +0530 Subject: [PATCH] Fix errcheck issues in server/channels/jobs/batch_migration_worker.go (#28832) --- server/.golangci.yml | 1 - server/channels/jobs/batch_migration_worker.go | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/.golangci.yml b/server/.golangci.yml index f19c85e813..85219c0a59 100644 --- a/server/.golangci.yml +++ b/server/.golangci.yml @@ -201,7 +201,6 @@ issues: channels/app/users/users_test.go|\ channels/app/web_broadcast_hooks_test.go|\ channels/app/webhook_test.go|\ - channels/jobs/batch_migration_worker.go|\ channels/jobs/batch_report_worker.go|\ channels/jobs/batch_worker_test.go|\ channels/jobs/helper_test.go|\ diff --git a/server/channels/jobs/batch_migration_worker.go b/server/channels/jobs/batch_migration_worker.go index 4d615a8cb1..3f20d89969 100644 --- a/server/channels/jobs/batch_migration_worker.go +++ b/server/channels/jobs/batch_migration_worker.go @@ -77,7 +77,10 @@ func (worker *BatchMigrationWorker) doBatch(rctx *request.Context, job *model.Jo job.Data = nextData // Migrations currently don't support reporting meaningful progress. - worker.jobServer.SetJobProgress(job, 0) + if err := worker.jobServer.SetJobProgress(job, 0); err != nil { + worker.logger.Error("Worker: Failed to set job progress", mlog.Err(err)) + return false + } return false }