Skip to content

Commit

Permalink
Add wait to retry (skip deploy)
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejearley authored Aug 14, 2023
1 parent 5071244 commit d318dbf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/oracle/src/providers/dkg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export class Dkg {
if (retries === 0) {
throw error
}
await new Promise(resolve => setTimeout(resolve, 2500))
console.log(`Retrying keygen request ${retries} more times`)
return await this.startKeygen(input, retries - 1)
}
Expand All @@ -148,6 +149,7 @@ export class Dkg {
if (retries === 0) {
throw error
}
await new Promise(resolve => setTimeout(resolve, 2500))
console.log(`Retrying reshare request ${retries} more times`)
return await this.startReshare(input, retries - 1)
}
Expand All @@ -174,6 +176,7 @@ export class Dkg {
if (retries === 0) {
throw error
}
await new Promise(resolve => setTimeout(resolve, 2500))
console.log(`Retrying get shares request ${retries} more times`)
return await this.getShares(input, retries - 1)
}
Expand Down Expand Up @@ -210,8 +213,9 @@ export class Dkg {
if (retries === 0) {
throw error
}
await new Promise(resolve => setTimeout(resolve, 2500))
console.log(`Retrying get deposit data request ${retries} more times`)
return await this.getDepositData(input, retries - 1)
}
}
}
}

0 comments on commit d318dbf

Please sign in to comment.