Commit 58f490e
committed
feat: add PostgreSQL database queue listener
Add a new `database` feature that enables listening for tasks from a
PostgreSQL table using pg_notify for real-time notifications.
- Add `db-listen` command with configurable table name (default: ow_tasks)
- Use SELECT FOR UPDATE SKIP LOCKED for safe concurrent task claiming
- Hybrid polling (pg_notify + 30s fallback) for reliability
- Support DATABASE_URL and TASK_TABLE environment variables
- Add comprehensive README with usage examples and SQL schema1 parent 1ca84e8 commit 58f490e
6 files changed
Lines changed: 2389 additions & 102 deletions
0 commit comments