fix: restore terminal hourly lifecycle after persistence failure (#56)
This commit is contained in:
@@ -209,6 +209,12 @@ export class BrokerageOperationsSyncService {
|
||||
'tbank.operations.sync.persistence_failed',
|
||||
{ userId: attempt.userId, code: TbankErrorCode.Unavailable },
|
||||
);
|
||||
// The step could not even record its failure; close the attempt
|
||||
// durably so it does not stay running. Best effort — an open row
|
||||
// is re-reserved by the next request.
|
||||
await this.repository
|
||||
.fail(attempt, false)
|
||||
.catch(() => undefined);
|
||||
}
|
||||
const next = pending ? await this.repository.pending(attempt) : null;
|
||||
if (next) {
|
||||
|
||||
Reference in New Issue
Block a user