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

Side by Side 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: self review 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 unified diff | Download patch
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 deps 5 package deps
6 6
7 import ( 7 import (
8 » "github.com/luci/gae/service/datastore" 8 » "github.com/luci/luci-go/appengine/cmd/dm/mutate"
9 » "github.com/luci/luci-go/appengine/cmd/dm/model" 9 » dm "github.com/luci/luci-go/common/api/dm/service/v1"
10 » "github.com/luci/luci-go/common/api/dm/service/v1" 10 » "github.com/luci/luci-go/common/logging"
11 google_pb "github.com/luci/luci-go/common/proto/google" 11 google_pb "github.com/luci/luci-go/common/proto/google"
12 "golang.org/x/net/context" 12 "golang.org/x/net/context"
13 ) 13 )
14 14
15 func (d *deps) ActivateExecution(c context.Context, req *dm.ActivateExecutionReq ) (*google_pb.Empty, error) { 15 func (d *deps) ActivateExecution(c context.Context, req *dm.ActivateExecutionReq ) (*google_pb.Empty, error) {
16 » err := datastore.Get(c).RunInTransaction(func(c context.Context) error { 16 » logging.Fields{"execution": req.Auth.Id}.Infof(c, "activating")
17 » » _, _, err := model.ActivateExecution(c, req.Auth, req.ExecutionT oken) 17 » err := tumbleNow(c, &mutate.ActivateExecution{
18 » » return err 18 » » Auth: req.Auth,
19 » }, nil) 19 » » NewTok: req.ExecutionToken,
20 » })
20 return &google_pb.Empty{}, err 21 return &google_pb.Empty{}, err
21 } 22 }
OLDNEW
« no previous file with comments | « no previous file | appengine/cmd/dm/deps/activate_execution_test.go » ('j') | appengine/cmd/dm/deps/ensure_graph_data.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698