You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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