Skip to content

Commit

Permalink
docs: 补充 任务流水线协议中对已废弃但仍兼容字段 is_subtimeout_next 的说明 (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
weinibuliu authored Sep 27, 2024
1 parent cf441aa commit d184a65
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
10 changes: 10 additions & 0 deletions docs/en_us/3.1-PipelineProtocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ This loop continues until the "next" of a task is empty, which signifies that th
When B and C are not recognized and D is recognized, D and D.next will be fully executed. But when the pipeline of D is fully executed. It will return to task A again and continue to try to recognize B, C, D, E.
This field is mostly used for exception handling. For example, D is to recognize the "network disconnection prompt box". After clicking confirm and waiting for the network connection to succeed, continue the previous task flow.
- `is_sub`: *bool*\
**(Deprecated in version 2.x, but retains compatibility.`interrupt` is recommended instead.)**\
Whether it is a subtask. Optional, default is false.
If it's a subtask, after completing this task (and subsequent tasks such as "next"), it will return to re-recognize the "next" list of this task.
For example: A.next = [B, Sub_C, D], where Sub_C.is_sub = true. If Sub_C is matched, after fully executing Sub_C and subsequent tasks, it will return to re-recognize [B, Sub_C, D] and execute the matching items and subsequent tasks.

- `rate_limit`: *uint*
Identification rate limit, in milliseconds. Optional, default 1000.
Each round of identification next consumes at least `rate_limit` milliseconds, and sleep will wait if the time is less than that.
Expand All @@ -94,6 +100,10 @@ This loop continues until the "next" of a task is empty, which signifies that th

- `on_error` : *string* | *list<string, >*
When recognition timeout or the action fails to execute, the tasks in this list will be executed next. Optional, empty by default.

- `timeout_next`: *string* | *list<string, >*\
**(Deprecated in version 2.x, but retains compatibility.`on_error` is recommended instead.)**\
List of tasks to execute after a timeout. Optional, default is empty.

- `inverse`: *bool*
Reverse the recognition result: recognized as not recognized, and not recognized as recognized. Optional, default is false.
Expand Down
13 changes: 12 additions & 1 deletion docs/zh_cn/3.1-任务流水线协议.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,14 @@ Orange 的 next 中,
例如: A: { next: [B, C], interrupt: [D, E] }
当 B, C 未识别到而识别到 D 时,会去完整的执行 D 及 D.next。但当 D 的流水线完全执行完毕后。会再次回到任务 A,继续尝试识别 B, C, D, E 。
该字段多用于异常处理,例如 D 是识别 “网络断开提示框”,在点击确认并等待网络连接成功后,继续之前的任务流程。
- `is_sub`: *bool*\
**(在2.x 版本中废弃,但保留兼容性,推荐使用 `interrupt` 替代)**\
是否是子任务。可选,认否。
如果是子任务,执行完本任务(及后续 next 等)后,会返回来再次识别本任务 **所在的** next 列表。
例如:A.next = [B, Sub_C, D],这里的 Sub_C.is_sub = true,
若匹配上了 Sub_C,在完整执行完 Sub_C 及后续任务后,会返回来再次识别 [B, Sub_C, D] 并执行命中项及后续任务。
- `rate_limit`: *uint*
识别速率限制,单位毫秒。可选,默认 1000 。
每轮识别 next 最低消耗 `rate_limit` 毫秒,不足的时间将会 sleep 等待。
Expand All @@ -99,6 +106,10 @@ Orange 的 next 中,
- `on_error` : *string* | *list<string, >*
当识别超时,或动作执行失败后,接下来会执行该列表中的任务。可选,默认空。
- `timeout_next`: *string* | *list<string, >*\
**(在2.x 版本中废弃,但保留兼容性,推荐使用 `on_error` 替代)**\
超时后执行的任务列表。可选,默认空。
- `inverse`: *bool*
反转识别结果,识别到了当做没识别到,没识别到的当做识别到了。可选,默认 false 。
Expand Down

0 comments on commit d184a65

Please sign in to comment.