feat: add fnOS packaging, storage workflows and release pipeline

This commit is contained in:
2026-08-11 18:05:49 +08:00
parent c5922f9b08
commit 95932f0199
181 changed files with 24024 additions and 1164 deletions
+29
View File
@@ -0,0 +1,29 @@
namespace dy.net.service
{
public sealed class OpenListTransferWorker : BackgroundService
{
private readonly IServiceScopeFactory _scopeFactory;
public OpenListTransferWorker(IServiceScopeFactory scopeFactory) => _scopeFactory = scopeFactory;
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
try
{
using var scope = _scopeFactory.CreateScope();
var worked = await scope.ServiceProvider.GetRequiredService<OpenListTransferService>()
.RecoverOneAsync(stoppingToken);
if (!worked) await Task.Delay(TimeSpan.FromSeconds(3), stoppingToken);
}
catch (OperationCanceledException) when (stoppingToken.IsCancellationRequested) { }
catch (Exception ex)
{
Serilog.Log.Error(ex, "OpenList 传输恢复服务异常");
await Task.Delay(TimeSpan.FromSeconds(5), stoppingToken);
}
}
}
}
}