如何在清单中为 IBM Cloud Functions 操作指定超时设置?

How to specify timeout setting for IBM Cloud Functions action in manifest?

我正在尝试 deploy an action for IBM Cloud Functions using a manifest file. I know that it is possible to change the value for the timeout setting 在 CLI 中使用 --timeout LIMIT。如何在清单文件中完成?

我找到了 OpenWhisk / IBM Cloud Functions manifest 的规范。可以为操作设置 limits。支持的限制之一是 timeout.

将超时设置为最大允许值可能如下所示(基于文档中提供的示例):

my_awesome_action:
  version: 1.0
  function: src/js/action.js
  runtime: nodejs@>0.12<6.0
  inputs:
    not_awesome_input_value:
      description: Some input string that is boring
      type: string
  outputs:
    awesome_output_value:
      description: Impressive output string
      type: string
  limits:
    timeout: 600000