Unverified Commit 8c1d89a2 authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #6187 from ipfs/fix/queue-error-handling

provider queue: don't repeatedly retry the same item if we fail
parents 1ade130f 1c3c1387
......@@ -72,13 +72,14 @@ func (q *Queue) nextEntry() (datastore.Key, cid.Cid) {
key := q.queueKey(q.head)
value, err := q.ds.Get(key)
if err == datastore.ErrNotFound {
log.Warningf("Error missing entry in queue: %s", key)
if err != nil {
if err == datastore.ErrNotFound {
log.Warningf("Error missing entry in queue: %s", key)
} else {
log.Errorf("Error fetching from queue: %s", err)
}
q.head++ // move on
continue
} else if err != nil {
log.Warningf("Error fetching from queue: %s", err)
continue
}
c, err := cid.Parse(value)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment