Phase 1: Add pgqueuer infrastructure and worker skeleton
- Add pgqueuer dependency to pyproject.toml - Create worker.py with basic setup: - Independent database connection using asyncpg - Install pgqueuer schema on startup - Register dummy job handler - Start consumer loop - Add 'make worker' command - Update 'make dev' to run worker alongside backend/frontend Validation: - Worker starts successfully - pgqueuer tables exist in database - All existing tests pass
This commit is contained in:
parent
607f872c71
commit
15bae15731
4 changed files with 69 additions and 1 deletions
6
Makefile
6
Makefile
|
|
@ -1,4 +1,4 @@
|
|||
.PHONY: install-backend install-frontend install setup-hooks backend frontend db db-stop db-ready db-seed dev test test-backend test-frontend test-e2e typecheck generate-types generate-types-standalone check-types-fresh check-constants lint-backend format-backend fix-backend security-backend lint-frontend fix-frontend format-frontend pre-commit lint
|
||||
.PHONY: install-backend install-frontend install setup-hooks backend frontend worker db db-stop db-ready db-seed dev test test-backend test-frontend test-e2e typecheck generate-types generate-types-standalone check-types-fresh check-constants lint-backend format-backend fix-backend security-backend lint-frontend fix-frontend format-frontend pre-commit lint
|
||||
|
||||
-include .env
|
||||
export
|
||||
|
|
@ -20,6 +20,9 @@ backend:
|
|||
frontend:
|
||||
cd frontend && npm run dev
|
||||
|
||||
worker:
|
||||
cd backend && uv run python worker.py
|
||||
|
||||
db:
|
||||
docker compose up -d db
|
||||
|
||||
|
|
@ -46,6 +49,7 @@ dev:
|
|||
$(MAKE) db-seed
|
||||
cd backend && uv run uvicorn main:app --reload & \
|
||||
cd frontend && npm run dev & \
|
||||
cd backend && uv run python worker.py & \
|
||||
wait
|
||||
|
||||
# TEST variable can be used to select specific tests:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue