go.tools/dashboard/app: remove redundant transaction

The code is already called from inside a transaction.

TBR=dvyukov
R=dvyukov
CC=golang-codereviews
https://golang.org/cl/161580045
This commit is contained in:
Andrew Gerrand 2014-10-31 09:03:27 +11:00
parent 5d1cfb1968
commit cce262cd47
1 changed files with 16 additions and 17 deletions

View File

@ -200,8 +200,8 @@ var (
)
)
// MUST be called from inside a transaction.
func sendPerfFailMail(c appengine.Context, builder string, res *PerfResult) error {
return datastore.RunInTransaction(c, func(c appengine.Context) error {
com := &Commit{Hash: res.CommitHash}
if err := datastore.Get(c, com.Key(c), com); err != nil {
return err
@ -218,7 +218,6 @@ func sendPerfFailMail(c appengine.Context, builder string, res *PerfResult) erro
return fmt.Errorf("can not find failed result for commit %v on builder %v", com.Hash, builder)
}
return commonNotify(c, com, builder, logHash)
}, nil)
}
// commonNotify MUST!!! be called from within a transaction inside which