mirror of
https://github.com/C9Glax/tranga.git
synced 2025-05-22 06:03:01 +02:00
Logging for Job-Cycle
This commit is contained in:
parent
5a6dc5a5b2
commit
49b382fe1f
@ -107,7 +107,10 @@ public static class Tranga
|
|||||||
PgsqlContext context = scope.ServiceProvider.GetRequiredService<PgsqlContext>();
|
PgsqlContext context = scope.ServiceProvider.GetRequiredService<PgsqlContext>();
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{ Log.Debug("Loading Jobs...");
|
{
|
||||||
|
Log.Debug("Starting Job-Cycle...");
|
||||||
|
DateTime cycleStart = DateTime.UtcNow;
|
||||||
|
Log.Debug("Loading Jobs...");
|
||||||
DateTime loadStart = DateTime.UtcNow;
|
DateTime loadStart = DateTime.UtcNow;
|
||||||
context.Jobs.Load();
|
context.Jobs.Load();
|
||||||
Log.Debug("Updating Entries...");
|
Log.Debug("Updating Entries...");
|
||||||
@ -198,6 +201,7 @@ public static class Tranga
|
|||||||
{
|
{
|
||||||
Log.Error("Failed saving Job changes.", e);
|
Log.Error("Failed saving Job changes.", e);
|
||||||
}
|
}
|
||||||
|
Log.Debug($"Job-Cycle over! (took {DateTime.UtcNow.Subtract(cycleStart).TotalMilliseconds}ms)");
|
||||||
Thread.Sleep(TrangaSettings.startNewJobTimeoutMs);
|
Thread.Sleep(TrangaSettings.startNewJobTimeoutMs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user