Skip to content

Implemented the queue-backed execution path#416

Open
codefather2026 wants to merge 2 commits into
gear5labs:masterfrom
codefather2026:master
Open

Implemented the queue-backed execution path#416
codefather2026 wants to merge 2 commits into
gear5labs:masterfrom
codefather2026:master

Conversation

@codefather2026
Copy link
Copy Markdown

@codefather2026 codefather2026 commented Jun 1, 2026

Closes #348


Implemented the queue-backed execution path and moved the first reliability-critical flows onto it.
The core is a durable Postgres job table plus leased workers in src/jobs/job.entity.ts, src/jobs/jobQueue.service.ts, src/jobs/jobWorker.ts, and src/jobs/jobHandlers.ts. Jobs now support delayed availability, lease renewal, retries with backoff, dead-lettering, per-user correlation, and queue stats. The schema is added in src/migrations/1773000000000-CreateJobQueue.ts, and the worker boots with the API server in src/index.ts.
I rewired delayed transaction submission to enqueue durable jobs instead of keeping in-memory timers in src/services/delayedTransaction.service.ts. I also moved funding-triggered deployment work off the webhook request path in src/Gateway/webhook.service.ts, backed webhook idempotency with the DB helper more defensibly in src/Gateway/webhookIdempotency.service.ts, and added admin observability endpoints for queue stats and dead-letter inspection in src/Gateway/routes.ts. I added focused tests in tests/unit/job_worker.test.ts and tests/unit/delayedTransaction.service.test.ts.
Verification is still incomplete here because this checkout does not have installed Node tooling: npm run build failed with tsc: command not found, and there is no local node_modules/.bin/tsc. Before shipping, the next step is to restore dependencies, run the migration, then run npm run build and the targeted Jest tests.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@codefather2026 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@codefather2026
Copy link
Copy Markdown
Author

Conflict resolved

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.

[Backend] Build queue-backed execution for delayed transactions and asynchronous side effects

2 participants