From 910f6a4b09c4fbaef75fdb64961a9619f51e5d94 Mon Sep 17 00:00:00 2001 From: Reed Allman Date: Wed, 2 Aug 2017 20:24:58 -0700 Subject: [PATCH] fix memory setting in cli, remove MEMORY_MB for now --- api/server/runner.go | 3 ++- cli/routes.go | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/api/server/runner.go b/api/server/runner.go index 439abdf30..baeaf3987 100644 --- a/api/server/runner.go +++ b/api/server/runner.go @@ -148,7 +148,8 @@ func (s *Server) serve(ctx context.Context, c *gin.Context, appName string, rout baseVars["FN_FORMAT"] = route.Format baseVars["APP_NAME"] = appName baseVars["ROUTE"] = route.Path - baseVars["MEMORY_MB"] = fmt.Sprintf("%d", route.Memory) + // TODO add this back after #193 #195 (fix async RAM) + // baseVars["MEMORY_MB"] = fmt.Sprintf("%d", route.Memory) // app config for k, v := range app.Config { diff --git a/cli/routes.go b/cli/routes.go index 9a713fb5e..0b1612956 100644 --- a/cli/routes.go +++ b/cli/routes.go @@ -263,6 +263,10 @@ func routeWithFuncFile(c *cli.Context, ff *funcfile, rt *fnmodels.Route) error { if rt.Type == "" && ff.Type != nil && *ff.Type != "" { rt.Type = *ff.Type } + if ff.Memory != nil { + rt.Memory = *ff.Memory + } + // TODO idle_timeout? headers? config? why is a func file not a yaml unmarshal of a route? return nil }