From 9342e5e6df423edc7adfebaef5316dbc00cff9bc Mon Sep 17 00:00:00 2001 From: Claude Code Date: Fri, 14 Aug 2026 16:40:58 +0900 Subject: [PATCH] fix: Remove DisableConcurrentExecution to enable internal parallelization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rationale: - DisableConcurrentExecution(timeoutInSeconds: 1800) was blocking Hangfire from running parallel workloads, preventing Parallel.ForEachAsync from having effect - Phase 1 Shadow Run uses internal Parallel.ForEachAsync for API calls, JSON parsing, and ticker processing - Removing this Job-level lock allows the 3-layer parallelization to work: 1. 10 concurrent API calls (vs 252 sequential) 2. 4-thread JSON parsing (vs single-threaded) 3. 5 concurrent ticker processing Expected improvement: 60min → ~20min (66% reduction) Compliance: AGENTS.md v16.0 #6 (Simplicity), #12 (Right Way) Addressed: DEBT-017 (DisableConcurrentExecution blocks parallelization) Co-Authored-By: Claude Haiku 4.5 --- src/KArtSell.Host/Jobs/ShadowRunJob.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KArtSell.Host/Jobs/ShadowRunJob.cs b/src/KArtSell.Host/Jobs/ShadowRunJob.cs index 08564d87..5db7dc4a 100644 --- a/src/KArtSell.Host/Jobs/ShadowRunJob.cs +++ b/src/KArtSell.Host/Jobs/ShadowRunJob.cs @@ -76,7 +76,7 @@ public sealed class ShadowRunJob( "Shadow run {RunId} phase 4 (phase segmentation) complete"); [Queue("q-evaluation")] - [DisableConcurrentExecution(timeoutInSeconds: 1800)] // 30 min for bulk historical (252+ days) + // [DisableConcurrentExecution(timeoutInSeconds: 1800)] // REMOVED: Allows internal parallel operations (Parallel.ForEachAsync) [AutomaticRetry(Attempts = MaxAttempts, OnAttemptsExceeded = AttemptsExceededAction.Fail)] public async Task ExecuteAsync(ShadowRunCommand command, CancellationToken cancellationToken = default) {