Skip to content

Commit

Permalink
fix broken error handling in knn classification write
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennedi committed Dec 1, 2020
1 parent aeb2626 commit 32017f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions usecases/classification/classifier_run_knn.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ func (c *Classifier) classifyItemUsingKNN(item search.Result, itemIndex int, kin
}

c.extendItemWithObjectMeta(&item, params, classified)
// TODO: send back over channel for batched storage
err = c.store(item)
if err != nil {
fmt.Printf("store %s/%s: %v", item.ClassName, item.ID, err)
return fmt.Errorf("store %s/%s: %v", item.ClassName, item.ID, err)
}

return nil
Expand Down

0 comments on commit 32017f2

Please sign in to comment.