[CHANGE] Services view

This commit is contained in:
max
2025-09-09 19:51:07 +02:00
parent 2593d02a73
commit 9ff4fcded2
6 changed files with 66 additions and 17 deletions

View File

@@ -11,14 +11,20 @@ public class ClientService(IServiceScopeFactory scopeFactory, ILogger<ClientServ
private readonly List<YouTubeClient> _clients = [];
private CancellationToken _cancellationToken;
private ILibraryService? _libraryService;
protected override async Task ExecuteServiceAsync(CancellationToken stoppingToken)
protected override async Task InitializeAsync(CancellationToken stoppingToken)
{
_cancellationToken = stoppingToken;
stoppingToken.Register(CancellationRequested);
using var scope = scopeFactory.CreateScope();
_libraryService = scope.ServiceProvider.GetRequiredService<ILibraryService>();
LogProgress("Initializing service...");
Pause();
}
protected override async Task ExecuteServiceAsync(CancellationToken stoppingToken)
{
}
private void CancellationRequested()