MCPcopy Create free account
hub / github.com/celer-pkg/celer / WithRetry

Method WithRetry

pkgs/cmd/exec.go:70–73  ·  view source on GitHub ↗

WithRetry enables automatic retry on command failure. maxAttempts controls how many times the command will be executed total (1 initial + N retries). A retry sleep of attempt * time.Second is applied between attempts.

(maxAttempts int)

Source from the content-addressed store, hash-verified

68// maxAttempts controls how many times the command will be executed total (1 initial + N retries).
69// A retry sleep of attempt * time.Second is applied between attempts.
70func (e *executor) WithRetry(maxAttempts int) *executor {
71 e.retryMaxAttempts = maxAttempts
72 return e
73}
74
75// ExecuteOutput executes the command quietly and returns its combined stdout/stderr as a string.
76func (e *executor) ExecuteOutput() (string, error) {

Callers 6

CheckIfRemoteBranchFunction · 0.80
CheckIfRemoteTagFunction · 0.80
GetRemoteHeadCommitFunction · 0.80
GetRemoteRefCommitFunction · 0.80
TestExecutor_WithRetryFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestExecutor_WithRetryFunction · 0.64