Skip to content

Commit

Permalink
update index.js (#40)
Browse files Browse the repository at this point in the history
Co-authored-by: chengke <chengke@uefee1b00be3a55.ant.amazon.com>
  • Loading branch information
cheng-kevin and chengke authored Aug 25, 2021
1 parent 576814c commit 104f27e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion robomaker-sample-app-ci/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@ function run() {
// check if RETRIES is valid (i.e. 0<) and not too large (i.e. <10)
if (RETRIES < 0 || 9 < RETRIES) {
core.setFailed(`Invalid number of retries. Must be between 0-9 inclusive`);
return;
}
for (let i = 0; i <= RETRIES; i++) {
try {
Expand All @@ -884,7 +885,6 @@ function run() {
console.log(`Action failed.. retrying in ${delay_ms} milliseconds`);
yield delay(delay_ms); // wait for next retry per the current exponential backoff delay
delay_ms = Math.min(delay_ms * 2, 1000 * MAXIMUM_BACKOFF_TIME_SECONDS); // double the delay for the next retry, truncate if required
core.setFailed(error.message);
}
}
});
Expand Down

0 comments on commit 104f27e

Please sign in to comment.