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
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,resetJobandtransactionJobschedule their next run only inside.then(), whileroundJob,timeoutProcessorJob,requeueWaitingEventsJobandeventSyncJobschedule it after plainawaits. None of them has acatch.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 nounhandledRejectionlistener, so the process exits; in a setup that does handle it, that job simply stops running.Keep up the Great Work,
Phroi