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

Unified Diff: appengine/cmd/dm/deps/activate_execution.go

Issue 1537883002: Initial distributor implementation (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: fix imports and make dummy.go a real file Created 4 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
« no previous file with comments | « no previous file | appengine/cmd/dm/deps/activate_execution_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/cmd/dm/deps/activate_execution.go
diff --git a/appengine/cmd/dm/deps/activate_execution.go b/appengine/cmd/dm/deps/activate_execution.go
index eb09e13c0559ef4682fbe2b0a61102726dbadf58..a0dfec29113369905c3408924a718da2ea188c3f 100644
--- a/appengine/cmd/dm/deps/activate_execution.go
+++ b/appengine/cmd/dm/deps/activate_execution.go
@@ -5,17 +5,18 @@
package deps
import (
- "github.com/luci/gae/service/datastore"
- "github.com/luci/luci-go/appengine/cmd/dm/model"
- "github.com/luci/luci-go/common/api/dm/service/v1"
+ "github.com/luci/luci-go/appengine/cmd/dm/mutate"
+ dm "github.com/luci/luci-go/common/api/dm/service/v1"
+ "github.com/luci/luci-go/common/logging"
google_pb "github.com/luci/luci-go/common/proto/google"
"golang.org/x/net/context"
)
func (d *deps) ActivateExecution(c context.Context, req *dm.ActivateExecutionReq) (*google_pb.Empty, error) {
- err := datastore.Get(c).RunInTransaction(func(c context.Context) error {
- _, _, err := model.ActivateExecution(c, req.Auth, req.ExecutionToken)
- return err
- }, nil)
+ logging.Fields{"execution": req.Auth.Id}.Infof(c, "activating")
+ err := tumbleNow(c, &mutate.ActivateExecution{
+ Auth: req.Auth,
+ NewTok: req.ExecutionToken,
+ })
return &google_pb.Empty{}, err
}
« no previous file with comments | « no previous file | appengine/cmd/dm/deps/activate_execution_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698