[DB] Update migrations for datetime update
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Library\" />
|
||||
<Folder Include="Logs\Debug\" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@@ -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)
|
||||
|
12
Manager.App/Services/System/SystemService.cs
Normal file
12
Manager.App/Services/System/SystemService.cs
Normal 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;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user