From 7b38d0aa2bfaa492250555e89e8375170a614d6a Mon Sep 17 00:00:00 2001 From: Glax Date: Mon, 19 May 2025 19:57:27 +0200 Subject: [PATCH] Add Debug-output for when next job is due if not job was started --- API/Tranga.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/API/Tranga.cs b/API/Tranga.cs index 76903ae..70d3b9a 100644 --- a/API/Tranga.cs +++ b/API/Tranga.cs @@ -173,6 +173,10 @@ public static class Tranga $"\t{jobsNotHeldBackByConnector.Count} not held back by Connector\n" + $"{startJobs.Count} were started."); + if (Log.IsDebugEnabled && dueJobs.Count < 1) + if(waitingJobs.MinBy(j => j.NextExecution) is { } nextJob) + Log.Debug($"Next job in {nextJob.NextExecution.Subtract(DateTime.UtcNow)} (at {nextJob.NextExecution}): {nextJob.JobId}"); + (Thread, Job)[] removeFromThreadsList = RunningJobs.Where(t => !t.Key.IsAlive) .Select(t => (t.Key, t.Value)).ToArray(); Log.Debug($"Remove from Threads List: {removeFromThreadsList.Length}");