-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Optional: Faster Cancellation with Redis
If step boundaries are too slow (steps take 10+ minutes), add Redis pub/sub:
# API: publish cancel signal
await redis.publish(f"job:{job_id}:cancel", "1")
# Worker: listen in background task
async def watch_cancellation(job_id: str, cancel_event: Event):
async with redis.subscribe(f"job:{job_id}:cancel") as sub:
async for msg in sub:
cancel_event.set()
return
# Orchestrator: check event (non-blocking)
if cancel_event.is_set():
raise InvestigationCancelled()Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels