Skip to content

Commit

Permalink
feat: use custom retry timeout upon failure (#212)
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Bouchard <sylvain.bouchard@ville.montreal.qc.ca>

Co-authored-by: Sylvain Bouchard <sylvain.bouchard@ville.montreal.qc.ca>
  • Loading branch information
sylvain-bouchard and sylvain-ville committed Jun 16, 2020
1 parent a42ae0c commit 49c24f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/workit-bpm-client/src/camundaMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ export class CamundaMessage {
if (this.hasBeenThreated) {
return;
}
const { retries } = error;
const { retries, retryTimeout } = error;
const retryTimeoutInMs = retryTimeout || 1000 * retries * 2;
await payload.taskService.handleFailure(task, {
errorMessage: error.message,
errorDetails: stringify(error),
retries,
// TODO: Add to configuration
retryTimeout: 1000 * retries * 2
retryTimeoutInMs
});
this.hasBeenThreated = true;
}
Expand Down

0 comments on commit 49c24f4

Please sign in to comment.