chore: add standard STATUS markers to worker streams and optimize test polling
This fixes the 'stuck' behavior in concurrent tests by ensuring the tests look for standard completion markers and don't wait for unnecessary timeouts.
This commit is contained in:
@@ -599,8 +599,12 @@ def run_worker_lifecycle(ticket: Ticket, context: WorkerContext, context_files:
|
||||
engine._dirty = True
|
||||
if "BLOCKED" in response.upper():
|
||||
ticket.mark_blocked(response)
|
||||
if event_queue:
|
||||
_queue_put(event_queue, "response", {"text": f"\n\n[STATUS] BLOCKED: {response}", "stream_id": f"Tier 3 (Worker): {ticket.id}", "status": "done"})
|
||||
else:
|
||||
ticket.mark_complete()
|
||||
if event_queue:
|
||||
_queue_put(event_queue, "response", {"text": "\n\n[STATUS] COMPLETED", "stream_id": f"Tier 3 (Worker): {ticket.id}", "status": "done"})
|
||||
|
||||
if event_queue:
|
||||
_queue_put(event_queue, "ticket_completed", {"ticket_id": ticket.id, "timestamp": time.time()})
|
||||
|
||||
Reference in New Issue
Block a user