From 53adb6c1c102ed96c2e1c066b90bbb9cb55bd491 Mon Sep 17 00:00:00 2001 From: Marius Nechifor Date: Mon, 25 Nov 2024 21:53:17 +0200 Subject: [PATCH] fixed queue cleaner being triggered perpetually after each run (#15) --- code/Infrastructure/Verticals/Jobs/JobChainingListener.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Infrastructure/Verticals/Jobs/JobChainingListener.cs b/code/Infrastructure/Verticals/Jobs/JobChainingListener.cs index b8d698b..b9f5c8c 100644 --- a/code/Infrastructure/Verticals/Jobs/JobChainingListener.cs +++ b/code/Infrastructure/Verticals/Jobs/JobChainingListener.cs @@ -19,7 +19,7 @@ public class JobChainingListener : IJobListener public async Task JobWasExecuted(IJobExecutionContext context, JobExecutionException? jobException, CancellationToken cancellationToken) { - if (string.IsNullOrEmpty(_nextJobName)) + if (string.IsNullOrEmpty(_nextJobName) || context.JobDetail.Key.Name == _nextJobName) { return; }