Skip to content

feat: production readiness — distributed locking, async workers, and docs#23

Merged
pratyush618 merged 4 commits intomasterfrom
feat/production-readiness
Mar 11, 2026
Merged

feat: production readiness — distributed locking, async workers, and docs#23
pratyush618 merged 4 commits intomasterfrom
feat/production-readiness

Conversation

@pratyush618
Copy link
Copy Markdown
Collaborator

Summary

  • Add distributed locking (queue.lock() / queue.alock()) with auto-extend, acquisition timeout, and cross-process support via DB-backed locks
  • Add async worker pool (AsyncWorkerPool with spawn_blocking, WorkerDispatcher trait in taskito-core)
  • Add diesel_common/ shared macro module eliminating SQLite/Postgres duplication
  • Full docs update for v0.4.0: changelog, task/worker/scheduling/serializer guides, API reference, new locking guide, and nav restructure

What's in this PR

Rust (taskito-core + taskito-python)

  • WorkerDispatcher trait for async worker dispatch
  • AsyncWorkerPool with GIL-safe spawn_blocking
  • acquire_lock / release_lock / extend_lock / get_lock_info storage methods
  • impl_diesel_lock_ops! macro shared across SQLite and Postgres backends
  • LockNotAcquired error variant

Python

  • queue.lock() sync context manager with auto-extend background thread
  • await queue.alock() async context manager
  • QueueLockMixin consolidating lock operations

Docs

  • docs/changelog.md — v0.4.0 section
  • docs/guide/tasks.mdretry_delays, soft_timeout, circuit_breaker, middleware, expires
  • docs/guide/workers.mddrain_timeout, worker tags
  • docs/guide/scheduling.mdtimezone on @queue.periodic()
  • docs/guide/serializers.mdMsgPackSerializer, EncryptedSerializer
  • docs/api/queue.md — full rewrite with all new methods and params
  • docs/guide/locking.md — new dedicated locking guide
  • zensical.toml — collapsible sidebar nav, learning-order subsections, removed footer attribution

…d macros

- Distributed locks with per-backend acquire/release/extend/reap and
  execution claims for exactly-once job processing
- WorkerDispatcher trait in core, AsyncWorkerPool in python bindings
  with spawn_blocking + GIL management
- Split scheduler into modules (poller, result_handler, maintenance)
- Split py_queue into modules (inspection, worker)
- Extract shared SQLite/Postgres logic into diesel_common/ macros to
  eliminate duplication across backends
- Add filtered job listing, per-queue stats, job archival, queue
  pause/resume, health checks, and Prometheus metrics endpoints
- Python-side: health module, locks module, dashboard enhancements
- Add v0.4.0 changelog section covering distributed locking, async workers,
  queue pause/resume, archival, circuit breakers, serializers, and more
- Add missing decorator options to tasks guide (retry_delays, soft_timeout,
  circuit_breaker, middleware, expires) with examples
- Add drain_timeout and worker tags/specialization to workers guide
- Add timezone support section to scheduling guide
- Add MsgPackSerializer and EncryptedSerializer to serializers guide
- Major update to api/queue.md: new constructor params, expanded decorator
  params, and new method sections (locking, workers, circuit breakers, logs,
  replay, archival, queue management, events/webhooks)
- Add distributed locking guide (docs/guide/locking.md)
- Add locking page to nav, reorder nav by learning progression
- Remove navigation.sections/expand for collapsible sidebar dropdowns
- Hide "Made with Zensical" footer via CSS
@pratyush618 pratyush618 merged commit 5244e05 into master Mar 11, 2026
11 checks passed
@pratyush618 pratyush618 deleted the feat/production-readiness branch March 31, 2026 17:23
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