Make search more lenient
When we fail to read a single message we don't need to fail the whole search, just log the error and we can still get results back.
This commit is contained in:
parent
00ed2ef06a
commit
d6696f34b8
|
@ -80,7 +80,8 @@ func (w *Worker) search(criteria *searchCriteria) ([]uint32, error) {
|
|||
for _, key := range keys {
|
||||
success, err := w.searchKey(key, criteria, requiredParts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
// don't return early so that we can still get some results
|
||||
w.worker.Logger.Printf("Failed to search key %v: %v", key, err)
|
||||
} else if success {
|
||||
matchedUids = append(matchedUids, key)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue