functions: performance improvements - LRU & singleflight DB calls (#322)

* functions: add cache and singleflight to ease database load

* runner: upgrade

* deps: upgrade glide files

* license: add third party notifications

* functions: fix handling of implicitly created apps

* functions: code deduplication

* functions: fix missing variable
This commit is contained in:
C Cirello
2016-11-21 19:48:11 +01:00
committed by GitHub
parent a4d360fb2e
commit f6d19c3cc9
14 changed files with 289 additions and 69 deletions

View File

@@ -65,7 +65,7 @@ func (m *Mock) GetRoutesByApp(appName string, routeFilter *models.RouteFilter) (
route := m.FakeRoute
if route == nil && m.FakeRoutes != nil {
for _, r := range m.FakeRoutes {
if r.AppName == appName && r.Path == routeFilter.Path && r.AppName == routeFilter.AppName {
if r.AppName == appName && (routeFilter.Path == "" || r.Path == routeFilter.Path) && (routeFilter.AppName == "" || r.AppName == routeFilter.AppName) {
routes = append(routes, r)
}
}