Skip to content

Commit

Permalink
feat: reenable retry
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Nov 27, 2023
1 parent 3eff783 commit b9be735
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion internal/indexer/indexer.registries.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ func indexNewVaultsWrapper(
** indexer to be able to catch the errors, to restart the indexer or just to exit the loop to
** fallback to another method.
**********************************************************************************************/
shouldRetry := false
shouldRetry := true
err := error(nil)
for {
if _, err := ethereum.GetWSClient(chainID); err != nil {
Expand Down Expand Up @@ -392,6 +392,7 @@ func indexNewVaultsWrapper(
logs.Error(`error while indexing NewVault from registry ` + registry.Address.Hex() + ` on chain ` + strconv.FormatUint(chainID, 10) + `: ` + err.Error())
}
if shouldRetry {
time.Sleep(30 * time.Second)
continue
}
break
Expand Down
3 changes: 2 additions & 1 deletion internal/indexer/indexer.stakingPools.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func indexStakingPoolWrapper(
** indexer to be able to catch the errors, to restart the indexer or just to exit the loop to
** fallback to another method.
**********************************************************************************************/
shouldRetry := false
shouldRetry := true
err := error(nil)

for {
Expand Down Expand Up @@ -210,6 +210,7 @@ func indexStakingPoolWrapper(
logs.Error(`error while indexing staking pools from registry ` + registry.Address.Hex() + ` on chain ` + strconv.FormatUint(chainID, 10) + `: ` + err.Error())
}
if shouldRetry {
time.Sleep(30 * time.Second)
continue
}
break
Expand Down
3 changes: 2 additions & 1 deletion internal/indexer/indexer.strategies.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ func indexStrategyWrapper(
** indexer to be able to catch the errors, to restart the indexer or just to exit the loop to
** fallback to another method.
**********************************************************************************************/
shouldRetry := false
shouldRetry := true
err := error(nil)

for {
Expand Down Expand Up @@ -536,6 +536,7 @@ func indexStrategyWrapper(
logs.Error(`error while indexing New Strategies from vault ` + vault.Address.Hex() + ` on chain ` + strconv.FormatUint(chainID, 10) + `: ` + err.Error())
}
if shouldRetry {
time.Sleep(30 * time.Second)
continue
}
break
Expand Down

0 comments on commit b9be735

Please sign in to comment.