Skip to content

A Single Failed Run Can Stop a Guard Processor Job #24

Description

@phroi

Hello folks at Rosen,

I noticed that the Guard's periodic processor jobs have no error handling, so one failed run, for example during a short database outage, can stop the Guard.

In runProcessors.ts, agreementQueueJob, scannedEventsJob, resetJob and transactionJob schedule their next run only inside .then(), while roundJob, timeoutProcessorJob, requeueWaitingEventsJob and eventSyncJob schedule it after plain awaits. None of them has a catch.

So if one run rejects, for example the unguarded getActiveTransactions() query (transactionProcessor), the next run is never scheduled and the rejection goes unhandled. The Guard's Node 22 image has no unhandledRejection listener, so the process exits; in a setup that does handle it, that job simply stops running.

Keep up the Great Work,
Phroi

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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