#527 [API/Perf] Sync subprocess blocks async event loop
Description
Edit**File:** api/blueprints/v1/workflows.py:115-122
**Problem:** `subprocess.run()` is synchronous and blocks the event loop for up to 10 seconds during Python DSL conversion. Stalls all concurrent requests.
**Fix:** Use async subprocess:
```python
proc = await asyncio.create_subprocess_exec(
'python3', tmp_file_path,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
cwd='/tmp'
)
stdout, stderr = await asyncio.wait_for(proc.communicate(), timeout=10)
```
**Impact:** Prevents event loop stalling. Handles 10x more concurrent DSL submissions.
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...