Support Function-level idle timeout setting (#1538)
This PR allows users to specify the idle timeout setting at Function-level. Fix #1050
This commit is contained in:
@@ -91,9 +91,11 @@ func (opts *CreateSubCommand) complete(input cli.Input) error {
|
||||
|
||||
fnTimeout := input.Int(flagkey.FnExecutionTimeout)
|
||||
if fnTimeout <= 0 {
|
||||
return errors.New("fntimeout must be greater than 0")
|
||||
return errors.Errorf("--%v must be greater than 0", flagkey.FnExecutionTimeout)
|
||||
}
|
||||
|
||||
fnIdleTimeout := input.Int(flagkey.FnIdleTimeout)
|
||||
|
||||
pkgName := input.String(flagkey.FnPackageName)
|
||||
|
||||
secretNames := input.StringSlice(flagkey.FnSecret)
|
||||
@@ -291,6 +293,7 @@ func (opts *CreateSubCommand) complete(input cli.Input) error {
|
||||
Resources: *resourceReq,
|
||||
InvokeStrategy: *invokeStrategy,
|
||||
FunctionTimeout: fnTimeout,
|
||||
IdleTimeout: &fnIdleTimeout,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user