Skip to content

docs: update Backend protocol listing in architecture guide - #50

Open
rcbevans wants to merge 1 commit into
mainfrom
chore/docs-architecture
Open

docs: update Backend protocol listing in architecture guide#50
rcbevans wants to merge 1 commit into
mainfrom
chore/docs-architecture

Conversation

@rcbevans

Copy link
Copy Markdown
Contributor

The Backend protocol code block in docs/architecture.md listed ~20 methods but the actual Backend protocol in src/taskq/backend/_protocol.py has 33+ methods. Third-party backend implementers reading the docs would not see the full contract.

Missing methods added:

  • enqueue_batch, enqueue_batch_fast — batched enqueue and COPY FROM fast-path
  • get_events, poll_reclaim_events — job event reads and crash-reclaim event polling
  • count_pending_jobs — pending+scheduled counts per actor
  • get_actor_max_pending — stored max_pending per actor (required as of protocol v3)
  • create_schedule, list_schedules, update_schedule, delete_schedule — schedule CRUD

Also expanded the existing method signatures to show full parameter lists with type hints and default values, so the listing matches the actual protocol contract without needing to open the source file. Added brief inline comments for non-self-explanatory methods.

Verified with uv run mkdocs build --strict and uv run ruff check ..

@rcbevans
rcbevans requested review from XBeg9, clinzy and kjw-azx July 29, 2026 05:44
@rcbevans rcbevans self-assigned this Jul 29, 2026
The protocol code block was missing 10+ methods that were added in
recent releases (enqueue_batch, poll_reclaim_events, schedule CRUD,
get_actor_max_pending, count_pending_jobs). Updated to reflect the
complete Backend protocol as of BACKEND_PROTOCOL_VERSION 3.
@rcbevans
rcbevans force-pushed the chore/docs-architecture branch from 5fa4aa0 to f6ec7c9 Compare July 30, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant