// ----------------------------------------------------------------------------- // 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 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> ProcessBatchAsync( List> batch) { var results = await Task.WhenAll(batch).ConfigureAwait(false); return results; } }