Skip to content

Commit

Permalink
added back the db update for retry (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
farhanW3 authored Dec 5, 2023
1 parent b70454e commit a56cb78
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/worker/tasks/retryTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const retryTx = async () => {
logger.worker.warn(
`[Transaction] [${tx.id}] ${tx.chainId} chain gas price is higher than maximum threshold.`,
);

return;
}

Expand All @@ -81,6 +82,18 @@ export const retryTx = async () => {
`[Transaction] [${tx.id}] Failed to retry with error - ${err}`,
);

await updateTx({
pgtx,
queueId: tx.id,
data: {
status: TransactionStatusEnum.Errored,
errorMessage:
err?.message ||
err?.toString() ||
`Failed to handle transaction`,
},
});

return;
}

Expand Down

0 comments on commit a56cb78

Please sign in to comment.