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

Side by Side Diff: dm/appengine/mutate/finish_attempt.go

Issue 2963503003: [errors] Greatly simplify common/errors package. (Closed)
Patch Set: fix nits Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « dm/appengine/mutate/add_deps.go ('k') | dm/appengine/mutate/timeout_execution.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package mutate 5 package mutate
6 6
7 import ( 7 import (
8 "google.golang.org/grpc/codes" 8 "google.golang.org/grpc/codes"
9 9
10 ds "github.com/luci/gae/service/datastore" 10 ds "github.com/luci/gae/service/datastore"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 ar := &model.AttemptResult{ 49 ar := &model.AttemptResult{
50 Attempt: model.AttemptKeyFromID(c, &atmpt.ID), 50 Attempt: model.AttemptKeyFromID(c, &atmpt.ID),
51 Data: *f.Data, 51 Data: *f.Data,
52 } 52 }
53 53
54 rslt := *f.Data 54 rslt := *f.Data
55 atmpt.Result.Data = &rslt 55 atmpt.Result.Data = &rslt
56 atmpt.Result.Data.Object = "" 56 atmpt.Result.Data.Object = ""
57 57
58 » err = errors.Annotate(ds.Put(c, atmpt, ar)).Tag(grpcutil.Tag.With(codes. Internal)). 58 » err = errors.Annotate(ds.Put(c, atmpt, ar), "during Put").Tag(grpcutil.T ag.With(codes.Internal)).Err()
59 » » Reason("during Put").Err()
60 return 59 return
61 } 60 }
62 61
63 func init() { 62 func init() {
64 tumble.Register((*FinishAttempt)(nil)) 63 tumble.Register((*FinishAttempt)(nil))
65 } 64 }
OLDNEW
« no previous file with comments | « dm/appengine/mutate/add_deps.go ('k') | dm/appengine/mutate/timeout_execution.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698