From f16156737754db67d4859a69b7f71708f30f53c6 Mon Sep 17 00:00:00 2001 From: Blake Niemyjski Date: Thu, 19 Sep 2024 16:26:40 -0500 Subject: [PATCH] Fixed a bug where queue job's would report cancelled log messages if nothing was processed. --- src/Foundatio/Jobs/QueueJobBase.cs | 2 +- src/Foundatio/Jobs/WorkItemJob/WorkItemJob.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Foundatio/Jobs/QueueJobBase.cs b/src/Foundatio/Jobs/QueueJobBase.cs index e19d50c8..af73e6b3 100644 --- a/src/Foundatio/Jobs/QueueJobBase.cs +++ b/src/Foundatio/Jobs/QueueJobBase.cs @@ -62,7 +62,7 @@ public async Task ProcessAsync(IQueueEntry queueEntry, Cancellatio return JobResult.Cancelled; if (queueEntry == null) - return JobResult.CancelledWithMessage("No queue entry to process."); + return JobResult.SuccessWithMessage("No queue entry to process."); using var activity = StartProcessQueueEntryActivity(queueEntry); using var _ = _logger.BeginScope(s => s diff --git a/src/Foundatio/Jobs/WorkItemJob/WorkItemJob.cs b/src/Foundatio/Jobs/WorkItemJob/WorkItemJob.cs index 6ca18285..4a7302b2 100644 --- a/src/Foundatio/Jobs/WorkItemJob/WorkItemJob.cs +++ b/src/Foundatio/Jobs/WorkItemJob/WorkItemJob.cs @@ -61,7 +61,7 @@ public async Task ProcessAsync(IQueueEntry queueEntry, return JobResult.Cancelled; if (queueEntry == null) - return JobResult.CancelledWithMessage("No queue entry to process."); + return JobResult.SuccessWithMessage("No queue entry to process."); if (cancellationToken.IsCancellationRequested) {