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 |
} |