From 83cdd54fca23c0aa7d9ca7c0345b8e42b84b4c23 Mon Sep 17 00:00:00 2001 From: Demis Bellot Date: Wed, 27 Mar 2024 13:24:30 +0800 Subject: [PATCH] Update JobServices.cs --- MyApp.ServiceInterface/JobServices.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MyApp.ServiceInterface/JobServices.cs b/MyApp.ServiceInterface/JobServices.cs index 1f7da47..d7f1fad 100644 --- a/MyApp.ServiceInterface/JobServices.cs +++ b/MyApp.ServiceInterface/JobServices.cs @@ -23,7 +23,7 @@ public async Task Any(GetNextJobs request) if (job == null) { var dbHasIncompleteJobs = await Db.SelectAsync(Db.From() - .Where(x => x.CompletedDate == null || x.StartedDate < DateTime.UtcNow.AddMinutes(-5))); + .Where(x => (x.CompletedDate == null || x.StartedDate < DateTime.UtcNow.AddMinutes(-5)) && x.Model != "rank")); if (dbHasIncompleteJobs.Count > 0) { await Any(new RestoreModelQueues { RestoreFailedJobs = true });