Skip to content

pyasynq 0.3.0

Choose a tag to compare

@denismaciel denismaciel released this 04 Nov 19:28
· 35 commits to master since this release

Fixes

This release fixes the task-ownership, recovery and option-handling bugs found in review. Each one has a regression test in tests/test_regressions.py.

  • Execution IDs. The engine now tracks each attempt by an ID it issues, rather than by task ID. Tasks with the same ID in different queues no longer swap results, and a cancel timer or callback left over from an earlier attempt can no longer finalize the retry.
  • Handlers that raise CancelledError themselves release their concurrency slot and are retried or archived like any other failure.
  • Non-failure errors (RateLimited, or is_failure returning False) are retried without using up max_retry.
  • Groups.
    • Failed aggregations are put back into their group and the group is re-registered, so they are aggregated again.
    • Delayed tasks with a group join that group when they're due.
    • Grouped tasks that come back from retry are aggregated again.
  • delete_queue now takes completed, grouped and aggregating tasks into account, and force=True removes them.
  • A task-ID conflict on a unique enqueue no longer leaves its uniqueness lock behind.
  • Sub-second timeout and retention now raise ValueError instead of silently becoming "unset", and fractional seconds round up.
  • A deleted queue reappears when a client enqueues into it again.
  • Smaller fixes:
    • Handler parameters declared positional-only now work.
    • An empty b"" result stays b"" instead of becoming None.
    • Workers no longer form a reference cycle that Python's garbage collector can't reclaim.
  • Redis timeouts. The client now allows 5s to connect and 10s per response; the redis-rs default response timeout is 500ms.

Packaging

  • Wheels: manylinux (x86_64, aarch64), musllinux (x86_64) and macOS (x86_64, arm64), all abi3 for CPython ≥ 3.10.
  • CI runs lint (clippy, rustfmt, ruff, mypy --strict, stubtest) and the full test suite, including the Go interop tests.