Add two more classes of error Fatal and NoRetry

These are for remotes to signal that they have a fatal error and don't
want to continue (eg cap exceeded) or that a particular file shouldn't
be retried for some reason.
This commit is contained in:
Nick Craig-Wood
2016-07-04 13:45:52 +01:00
parent 018fe80bcb
commit 28f4061892
4 changed files with 113 additions and 13 deletions
+1 -1
View File
@@ -199,7 +199,7 @@ again:
obj, err := remote.Put(in, obji)
if err != nil {
// Retry if err returned a retry error
if r, ok := err.(fs.Retry); ok && r.Retry() && tries < maxTries {
if fs.IsRetryError(err) && tries < maxTries {
t.Logf("Put error: %v - low level retry %d/%d", err, tries, maxTries)
tries++