🐛 Fix some issues in sepration of the Pass and Wallet service

This commit is contained in:
2026-02-04 00:04:54 +08:00
parent 9a1f36ee26
commit 148117c54a
18 changed files with 5157 additions and 158 deletions

View File

@@ -1,15 +1,18 @@
namespace DysonNetwork.Drive.Storage;
public class FileReanalysisBackgroundService(FileReanalysisService reanalysisService, ILogger<FileReanalysisBackgroundService> logger, IConfiguration config) : BackgroundService
public class FileReanalysisBackgroundService(IServiceProvider srv, ILogger<FileReanalysisBackgroundService> logger, IConfiguration config) : BackgroundService
{
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
logger.LogInformation("File reanalysis background service started");
using var scope = srv.CreateScope();
while (!stoppingToken.IsCancellationRequested)
{
try
{
var reanalysisService = scope.ServiceProvider.GetRequiredService<FileReanalysisService>();
await reanalysisService.ProcessNextFileAsync();
}
catch (Exception ex)