Created UserService
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
namespace FabApprovalWorkerService.Workers;
|
||||
|
||||
public class UserCertificationUpdateWorker : BackgroundService {
|
||||
private readonly ILogger<UserCertificationUpdateWorker> _logger;
|
||||
|
||||
public UserCertificationUpdateWorker(ILogger<UserCertificationUpdateWorker> logger) {
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken) {
|
||||
while (!stoppingToken.IsCancellationRequested) {
|
||||
if (_logger.IsEnabled(LogLevel.Information)) {
|
||||
_logger.LogInformation("UserCertificationUpdateWorker running at: {time}", DateTimeOffset.Now);
|
||||
}
|
||||
await Task.Delay(1000, stoppingToken);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user