Skip to content

settlement-engine worker uses a single process/thread without supervision #561

Description

@therealjhay

ProblemThe settlement worker is a single process; an unhandled rejection or crash takes all settlement jobs down until restarted manually.

  1. No supervisor/restart.
  2. Unhandled rejections not caught at top level.
  3. Jobs stuck while process is down.

Solution

  • Add top-level error handling and process supervision (or run under PM2/systemd).
  • Ensure BullMQ jobs are retried after restart.
  • Test crash-recovery.

Acceptance Criteria

  • Process restarts automatically after crash.
  • Jobs resume.
  • pnpm --filter settlement-engine build passes.

Note for Contributors: Write a clear PR description. Show a crash-restart-recovery test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions