From 49b382fe1f78bb116ca19581c0a562c39b1765af Mon Sep 17 00:00:00 2001 From: Glax Date: Fri, 16 May 2025 21:27:02 +0200 Subject: [PATCH] Logging for Job-Cycle --- API/Tranga.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/API/Tranga.cs b/API/Tranga.cs index b1b0fe7..f5039f8 100644 --- a/API/Tranga.cs +++ b/API/Tranga.cs @@ -107,7 +107,10 @@ public static class Tranga PgsqlContext context = scope.ServiceProvider.GetRequiredService(); while (true) - { Log.Debug("Loading Jobs..."); + { + Log.Debug("Starting Job-Cycle..."); + DateTime cycleStart = DateTime.UtcNow; + Log.Debug("Loading Jobs..."); DateTime loadStart = DateTime.UtcNow; context.Jobs.Load(); Log.Debug("Updating Entries..."); @@ -198,6 +201,7 @@ public static class Tranga { Log.Error("Failed saving Job changes.", e); } + Log.Debug($"Job-Cycle over! (took {DateTime.UtcNow.Subtract(cycleStart).TotalMilliseconds}ms)"); Thread.Sleep(TrangaSettings.startNewJobTimeoutMs); } }