MCPcopy
hub / github.com/rclone/rclone / retryBlock

Method retryBlock

backend/cache/cache_internal_test.go:1294–1304  ·  view source on GitHub ↗
(block func() error, maxRetries int, rate time.Duration)

Source from the content-addressed store, hash-verified

1292}
1293
1294func (r *run) retryBlock(block func() error, maxRetries int, rate time.Duration) error {
1295 var err error
1296 for range maxRetries {
1297 err = block()
1298 if err == nil {
1299 return nil
1300 }
1301 time.Sleep(rate)
1302 }
1303 return err
1304}
1305
1306func (r *run) getCacheFs(f fs.Fs) (*cache.Fs, error) {
1307 cfs, ok := f.(*cache.Fs)

Calls

no outgoing calls

Tested by

no test coverage detected