MCPcopy
hub / github.com/dgraph-io/dgraph / retryUntilSuccess

Method retryUntilSuccess

worker/draft.go:1929–1938  ·  view source on GitHub ↗
(fn func() error, pause time.Duration)

Source from the content-addressed store, hash-verified

1927}
1928
1929func (n *node) retryUntilSuccess(fn func() error, pause time.Duration) {
1930 var err error
1931 for {
1932 if err = fn(); err == nil {
1933 break
1934 }
1935 glog.Errorf("Error while calling fn: %v. Retrying...\n", err)
1936 time.Sleep(pause)
1937 }
1938}
1939
1940// InitAndStartNode gets called after having at least one membership sync with the cluster.
1941func (n *node) InitAndStartNode() {

Callers 1

InitAndStartNodeMethod · 0.95

Calls 1

ErrorfMethod · 0.45

Tested by

no test coverage detected