feat(backend): DBOS worker process + enqueue round-trip#4692
feat(backend): DBOS worker process + enqueue round-trip#4692marcoacierno wants to merge 3 commits into
Conversation
First step of the DBOS foundation slice (see SPEC.md / tasks/plan.md). dbos 2.24.0 ships a Python 3.13 wheel; verified import on 3.13.5. Additive only — Celery/Redis untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Phase A of the DBOS foundation (SPEC.md / tasks/plan.md): - pycon/dbos_app.py: build_dbos_config() from Django settings + lazy get_dbos_client() for the web tier (enqueue-only, never launches DBOS). - pycon/dbos_workflows.py: minimal healthcheck workflow + step (proof only, not wired into any request path). - settings: DBOS_APP_NAME, DBOS_SYSTEM_DATABASE_URL (postgresql:// scheme), DBOS_SYS_DB_POOL_SIZE=5 (low on purpose; shared Postgres). - tests: in-process exec, idempotency (step runs once under same workflow id), and config-build. Run against a dedicated dbos_test Postgres DB. SQLite is unusable as a DBOS system DB in 2.24.0 (migrations are raw Postgres DDL), so tests use a real Postgres database. Additive only; Celery untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Phase B of the DBOS foundation (SPEC.md / tasks/plan.md): - manage.py dbos_worker: launches DBOS, registers the shared queue, blocks, and shuts down cleanly on SIGTERM/SIGINT. Mirrors the Celery worker role. - manage.py dbos_enqueue_healthcheck: enqueues the healthcheck workflow via DBOSClient (web-tier pattern) and waits for the result. - dbos_app.py: DBOS_QUEUE_NAME constant shared by producer and consumer. - dbos_workflows.py: pin explicit workflow name for the enqueue contract. - settings: register the `pycon` package as an app so its project-level management commands are discoverable (it has no models). - docker-compose: DBOS_SYSTEM_DATABASE_URL on the shared env + a dbos-worker service. DBOS auto-creates the `dbos` database on first launch locally. Verified end to end: enqueue -> worker executes -> result 'ok'. Additive; Celery/Redis untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This PR introduces DBOS as a durable workflow engine running alongside Celery, scoped to a proof-of-concept healthcheck round-trip. No existing functionality is changed. Thread safety bug in
No pytest marker for integration tests ( References to missing files: Minor:
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4692 +/- ##
==========================================
- Coverage 92.43% 92.01% -0.42%
==========================================
Files 355 359 +4
Lines 10719 10795 +76
Branches 818 822 +4
==========================================
+ Hits 9908 9933 +25
- Misses 698 749 +51
Partials 113 113 🚀 New features to boost your workflow:
|
Stack (top to bottom):