mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fix memory setting in cli, remove MEMORY_MB for now
This commit is contained in:
@@ -148,7 +148,8 @@ func (s *Server) serve(ctx context.Context, c *gin.Context, appName string, rout
|
|||||||
baseVars["FN_FORMAT"] = route.Format
|
baseVars["FN_FORMAT"] = route.Format
|
||||||
baseVars["APP_NAME"] = appName
|
baseVars["APP_NAME"] = appName
|
||||||
baseVars["ROUTE"] = route.Path
|
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
|
// app config
|
||||||
for k, v := range app.Config {
|
for k, v := range app.Config {
|
||||||
|
|||||||
@@ -263,6 +263,10 @@ func routeWithFuncFile(c *cli.Context, ff *funcfile, rt *fnmodels.Route) error {
|
|||||||
if rt.Type == "" && ff.Type != nil && *ff.Type != "" {
|
if rt.Type == "" && ff.Type != nil && *ff.Type != "" {
|
||||||
rt.Type = *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
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user