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

Unified Diff: logdog/server/cmd/logdog_archivist/main.go

Issue 2951393002: [errors] de-specialize Transient in favor of Tags. (Closed)
Patch Set: more refactor Created 3 years, 6 months 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: logdog/server/cmd/logdog_archivist/main.go
diff --git a/logdog/server/cmd/logdog_archivist/main.go b/logdog/server/cmd/logdog_archivist/main.go
index 93e469480b507e05029390052dd4c590415a4aeb..0e246cff0d4222a4f71244f99f2d80434c62334f 100644
--- a/logdog/server/cmd/logdog_archivist/main.go
+++ b/logdog/server/cmd/logdog_archivist/main.go
@@ -14,6 +14,7 @@ import (
gcps "github.com/luci/luci-go/common/gcloud/pubsub"
log "github.com/luci/luci-go/common/logging"
"github.com/luci/luci-go/common/retry"
+ "github.com/luci/luci-go/common/retry/transient"
"github.com/luci/luci-go/common/tsmon/distribution"
"github.com/luci/luci-go/common/tsmon/field"
"github.com/luci/luci-go/common/tsmon/metric"
@@ -145,7 +146,7 @@ func (a *application) runArchivist(c context.Context) error {
}
}
- err = retry.Retry(c, retry.TransientOnly(retryForever), func() error {
+ err = retry.Retry(c, transient.Only(retryForever), func() error {
return grpcutil.WrapIfTransient(sub.Receive(c, func(c context.Context, msg *pubsub.Message) {
c = log.SetFields(c, log.Fields{
"messageID": msg.ID,

Powered by Google App Engine
This is Rietveld 408576698