This commit is contained in:
2026-10-26 12:31:02 +01:00
parent a2e81f6a32
commit 06ff8dc425
9 changed files with 54 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
namespace imbelinvd;
public class Worker(ILogger<Worker> logger) : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
if (logger.IsEnabled(LogLevel.Information))
{
logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now);
}
await Task.Delay(1000, stoppingToken);
}
}
}