Skip to content

Commit

Permalink
Fixed a bug where queue job's would report cancelled log messages if …
Browse files Browse the repository at this point in the history
…nothing was processed.
  • Loading branch information
niemyjski committed Sep 19, 2024
1 parent 25be8c8 commit f161567
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Foundatio/Jobs/QueueJobBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public async Task<JobResult> ProcessAsync(IQueueEntry<T> 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
Expand Down
2 changes: 1 addition & 1 deletion src/Foundatio/Jobs/WorkItemJob/WorkItemJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public async Task<JobResult> ProcessAsync(IQueueEntry<WorkItemData> 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)
{
Expand Down

0 comments on commit f161567

Please sign in to comment.