Skip to content

Feat/bull#235

Open
nafsonig wants to merge 3 commits intoPulsefy:mainfrom
nafsonig:feat/bull
Open

Feat/bull#235
nafsonig wants to merge 3 commits intoPulsefy:mainfrom
nafsonig:feat/bull

Conversation

@nafsonig
Copy link
Copy Markdown

Changes implemented
✅ Queue configuration
Updated onchain.module.ts

Added defaultJobOptions for the onchain queue:
attempts: 5
exponential backoff
removeOnComplete retention policy
removeOnFail retention policy
Added an onchain-dead-letter queue registration for failed jobs.
Updated onchain.service.ts

Configured removeOnComplete and removeOnFail options for onchain job creation.
✅ Dead Letter Queue logic
Updated onchain.processor.ts
Added detection for transient onchain errors like network timeouts and ledger congestion.
Added final-failure handling to move jobs into the onchain-dead-letter queue after all retries are exhausted.
Added logging for dead-letter transitions and transient failure warnings.
✅ Job monitoring endpoint/service
Added jobs-monitor.service.ts

Provides queue health information for verification, notifications, onchain, and onchain-dead-letter.
Includes readiness state and queue counts.
Updated jobs.controller.ts

Uses the new service to expose queue health.
Routes available at GET /jobs/status and GET /jobs/health.
Updated jobs.module.ts

Added JobsMonitorService provider.

Closes #230

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

@nafsonig 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

@Cedarich
Copy link
Copy Markdown
Contributor

@nafsonig fix build

Run pnpm --filter backend run build

backend@0.0.1 build /home/runner/work/Soter/Soter/app/backend
node ../../node_modules/@nestjs/cli/bin/nest.js build
src/jobs/jobs-monitor.service.ts:39:15 - error TS2339: Property 'isReady' does not exist on type 'Queue<any, any, string, any, any, string>'.
39 queue.isReady(),
~~~~~~~
Found 1 error(s).
/home/runner/work/Soter/Soter/app/backend:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  backend@0.0.1 build: node ../../node_modules/@nestjs/cli/bin/nest.js build
Exit status 1
Error: Process completed with exit code 1.

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.

BullMQ Reliability: Dead Letter Queues & Monitoring

2 participants