(block func() error, maxRetries int, rate time.Duration)
| 1292 | } |
| 1293 | |
| 1294 | func (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 | |
| 1306 | func (r *run) getCacheFs(f fs.Fs) (*cache.Fs, error) { |
| 1307 | cfs, ok := f.(*cache.Fs) |
no outgoing calls
no test coverage detected