Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: impl/prod/raw_datastore.go

Issue 1521823003: Clean up callback interfaces. (Closed) Base URL: https://github.com/luci/gae.git@extra
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: impl/prod/raw_datastore.go
diff --git a/impl/prod/raw_datastore.go b/impl/prod/raw_datastore.go
index e70b31adb06670de9cbcdab4a238626571dbcb8b..106fb50efee8e75cf65fca43b665aa72aab69b19 100644
--- a/impl/prod/raw_datastore.go
+++ b/impl/prod/raw_datastore.go
@@ -216,8 +216,11 @@ func (d rdsImpl) Run(fq *ds.FinalizedQuery, cb ds.RawRunCB) error {
if err != nil {
return err
}
- if !cb(dsR2F(k), tf.pm, cfunc) {
- return nil
+ if err := cb(dsR2F(k), tf.pm, cfunc); err != nil {
+ if err == ds.Stop {
+ err = nil
+ }
+ return err
}
}
}

Powered by Google App Engine
This is Rietveld 408576698