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

Unified Diff: dm/appengine/mutate/schedule_execution.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: dm/appengine/mutate/schedule_execution.go
diff --git a/dm/appengine/mutate/schedule_execution.go b/dm/appengine/mutate/schedule_execution.go
index 614adb8d31d1a0d376c7bed24d699045989b6a31..461d99363963a0c18c68dc2576296ce0bb910a58 100644
--- a/dm/appengine/mutate/schedule_execution.go
+++ b/dm/appengine/mutate/schedule_execution.go
@@ -8,9 +8,9 @@ import (
"fmt"
ds "github.com/luci/gae/service/datastore"
- "github.com/luci/luci-go/common/errors"
"github.com/luci/luci-go/common/logging"
"github.com/luci/luci-go/common/proto/google"
+ "github.com/luci/luci-go/common/retry/transient"
dm "github.com/luci/luci-go/dm/api/service/v1"
"github.com/luci/luci-go/dm/appengine/distributor"
"github.com/luci/luci-go/dm/appengine/model"
@@ -86,7 +86,7 @@ func (s *ScheduleExecution) RollForward(c context.Context) (muts []tumble.Mutati
}
e.DistributorToken = string(distTok)
if err != nil {
- if errors.IsTransient(err) {
+ if transient.Tag.In(err) {
// tumble will retry us later
logging.WithError(err).Errorf(c, "got transient error in ScheduleExecution")
return

Powered by Google App Engine
This is Rietveld 408576698