Skip to content

Commit

Permalink
identify retryTimeout + placeholder for err handler
Browse files Browse the repository at this point in the history
  • Loading branch information
amirylm committed Feb 14, 2024
1 parent bb12ee9 commit cb19d4b
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/patrickmn/go-cache"

"github.com/smartcontractkit/chainlink-automation/pkg/v3/types"
"github.com/smartcontractkit/chainlink-common/pkg/services"
ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation"

Expand Down Expand Up @@ -251,6 +252,19 @@ func (s *streams) DoMercuryRequest(ctx context.Context, lookup *mercury.StreamsL
checkResults[i].RetryInterval = retryInterval
checkResults[i].PipelineExecutionState = uint8(state)
checkResults[i].IneligibilityReason = uint8(reason)
retryTimeout := retryInterval == mercury.RetryIntervalTimeout
if retryTimeout {
// in case of retry timeout, setting retryable to false
checkResults[i].Retryable = false
}
upkeepType := core.GetUpkeepType(checkResults[i].UpkeepID)
switch state {
case encoding.MercuryFlakyFailure:
if retryTimeout && upkeepType == types.LogTrigger && retryable {

Check failure on line 263 in core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/streams/streams.go

View workflow job for this annotation

GitHub Actions / lint

empty-block: this block is empty, you can remove it (revive)
// TODO: prepare for error handler
}
default:
}
return nil, err
}

Expand Down

0 comments on commit cb19d4b

Please sign in to comment.