Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.12 KB

File metadata and controls

35 lines (24 loc) · 1.12 KB

async task queue

Language: Python · Sphere: programming · Category: Async

What it does

Async Task Queue with Priority and Retries

A production-ready async task queue implementation with priority levels, automatic retries with exponential backoff, and dead-letter queue handling.

Guarantee

When it runs, async task queue guarantees stats['completed'] == 3 and stats['processing'] == 0; s['completed'] == 3; order == ['high', 'norm', 'low'] (proven by run).

Checkable constraints:

  • order == ['high', 'norm', 'low']
  • await q.dequeue() is None
  • await q.complete_task(t_high.id) is True
  • await q.complete_task(t_high.id) is False
  • await q.complete_task('ghost') is False
  • stats['completed'] == 3 and stats['processing'] == 0
  • got.id == flaky.id
  • await q.fail_task(flaky.id, 'boom-1') is True

Verification evidence

  • Green-run: ✓ passes (re-run under the extractor's gate)
  • Constraint strength: recovery (truth-pinned)
  • Independent oracle:consensus — xlang (validator v1.9)
  • Peer review: unreviewed

△ AURA Pattern Library — © Reality Optimizer