mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user