[backend/queue] Remove trace logging

This commit is contained in:
Laura Hausmann 2024-06-16 21:56:56 +02:00
parent 10d40513d3
commit 47ab95cc1b
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -162,7 +162,6 @@ public class QueueService(
{ {
if (!first) await Task.Delay(TimeSpan.FromMinutes(5), token); if (!first) await Task.Delay(TimeSpan.FromMinutes(5), token);
else first = false; else first = false;
logger.LogTrace("Checking for stalled jobs...");
await using var scope = scopeFactory.CreateAsyncScope(); await using var scope = scopeFactory.CreateAsyncScope();
await using var db = scope.ServiceProvider.GetRequiredService<DatabaseContext>(); await using var db = scope.ServiceProvider.GetRequiredService<DatabaseContext>();
foreach (var queue in _queues) foreach (var queue in _queues)
@ -179,11 +178,7 @@ public class QueueService(
_ => "HealthchecksWorker"), _ => "HealthchecksWorker"),
token); token);
if (cnt <= 0) if (cnt <= 0) continue;
{
logger.LogTrace("Healthchecks worker found no stalled jobs in queue {name}", queue.Name);
continue;
}
var jobs = await db.Jobs var jobs = await db.Jobs
.Where(p => p.Status == Job.JobStatus.Failed && .Where(p => p.Status == Job.JobStatus.Failed &&