feat(aihitRelationshipsSyncer): Реализована логика синхронизации связей между Unit+CI/CD

This commit is contained in:
Mikhail Kuznetsov
2025-05-27 11:32:05 +10:00
parent cc52818d29
commit 078c8b540f
33 changed files with 4389 additions and 6 deletions

View File

@@ -0,0 +1,27 @@
using PARR.AIHITRelationshipsSyncer;
namespace PARR.AIHITRelationshipsSyncerWorker;
public class Worker : BackgroundService
{
private readonly IServiceProvider serviceProvider;
public Worker(IServiceProvider serviceProvider)
{
this.serviceProvider = serviceProvider;
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
using (var scope = serviceProvider.CreateScope())
{
var relationshipsSyncer = scope.ServiceProvider.GetService<IRelationshipsSyncer>();
if (relationshipsSyncer == null)
throw new Exception($"<22><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> {nameof(IRelationshipsSyncer)}");
await relationshipsSyncer.StartAsync();
}
}
}