[DB] Update migrations for datetime update

This commit is contained in:
max
2025-09-02 16:17:47 +02:00
parent d98a99d145
commit a8b0291ebf
7 changed files with 58 additions and 11 deletions

View File

@@ -31,6 +31,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Library\" />
<Folder Include="Logs\Debug\" />
</ItemGroup>

View File

@@ -8,21 +8,26 @@ namespace Manager.App.Services.System;
public class ClientManager : BackgroundService
{
private readonly List<YouTubeClient> _clients = [];
private bool _cancelled;
private CancellationToken _cancellationToken;
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
_cancellationToken = stoppingToken;
stoppingToken.Register(CancellationRequested);
}
private void CancellationRequested()
{
_cancelled = true;
// Clear up
}
public async Task<Result<YouTubeClient>> LoadClient(ClientAccountEntity accountEntity)
{
if (_cancellationToken.IsCancellationRequested)
{
return ResultError.Fail("Service is shutting down.");
}
var container = new CookieContainer();
if (accountEntity.HttpCookies.Count != 0)

View File

@@ -0,0 +1,12 @@
namespace Manager.App.Services.System;
public class SystemService : BackgroundService
{
private CancellationToken _cancellationToken { get; set; }
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
_cancellationToken = stoppingToken;
}
}