stabilizaiton work - projects rework for maintenanceability and ui livening
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// ArtifactMigrationService.Batch.cs
|
||||
// Sprint: SPRINT_20260118_017_Evidence_artifact_store_unification
|
||||
// Task: AS-006 - Migrate existing evidence to unified store
|
||||
// Description: Batch execution helpers for artifact migration
|
||||
// -----------------------------------------------------------------------------
|
||||
namespace StellaOps.Artifact.Infrastructure;
|
||||
|
||||
public sealed partial class ArtifactMigrationService
|
||||
{
|
||||
private async Task<ArtifactMigrationResult> QueueMigrationAsync(
|
||||
LegacyArtifact legacy,
|
||||
SemaphoreSlim semaphore,
|
||||
CancellationToken ct)
|
||||
{
|
||||
await semaphore.WaitAsync(ct).ConfigureAwait(false);
|
||||
try
|
||||
{
|
||||
return await MigrateOneAsync(legacy, ct).ConfigureAwait(false);
|
||||
}
|
||||
finally
|
||||
{
|
||||
semaphore.Release();
|
||||
}
|
||||
}
|
||||
|
||||
private static async Task<IReadOnlyList<ArtifactMigrationResult>> ProcessBatchAsync(
|
||||
List<Task<ArtifactMigrationResult>> batch)
|
||||
{
|
||||
var results = await Task.WhenAll(batch).ConfigureAwait(false);
|
||||
return results;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user