Addressing review comments

reverting query string caching in favour of Go 1.9 sqlx features
 moving context definition out of call.End to upper level
This commit is contained in:
Denis Makogon
2017-09-06 09:21:59 +03:00
parent 6a541139a9
commit 9a89366d1b
5 changed files with 86 additions and 97 deletions

View File

@@ -287,11 +287,7 @@ func (c *call) End(ctx context.Context, err error) {
// XXX (reed): delete MQ message, eventually
}
// need newer context because original one may be modified
// and no longer be valid for further context-bound operations
if err := c.ds.InsertCall(context.Background(), c.Call); err != nil {
// TODO we should just log this error not return it to user?
// just issue storing call status but call is run
if err := c.ds.InsertCall(opentracing.ContextWithSpan(ctx, span), c.Call); err != nil {
logrus.WithError(err).Error("error inserting call into datastore")
}
}