From d184a65ae66f26e1b11b9910ce128be5ca69ebe4 Mon Sep 17 00:00:00 2001 From: weinibuliu <2155768781@qq.com> Date: Fri, 27 Sep 2024 17:32:44 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=A1=A5=E5=85=85=20=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=B5=81=E6=B0=B4=E7=BA=BF=E5=8D=8F=E8=AE=AE=E4=B8=AD=E5=AF=B9?= =?UTF-8?q?=E5=B7=B2=E5=BA=9F=E5=BC=83=E4=BD=86=E4=BB=8D=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=20`is=5Fsub`=20=E4=B8=8E=20`timeout=5Fnext`?= =?UTF-8?q?=20=E7=9A=84=E8=AF=B4=E6=98=8E=20(#364)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en_us/3.1-PipelineProtocol.md | 10 ++++++++++ ...\260\264\347\272\277\345\215\217\350\256\256.md" | 13 ++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/en_us/3.1-PipelineProtocol.md b/docs/en_us/3.1-PipelineProtocol.md index f9f496fda..80f90bb06 100644 --- a/docs/en_us/3.1-PipelineProtocol.md +++ b/docs/en_us/3.1-PipelineProtocol.md @@ -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. @@ -94,6 +100,10 @@ This loop continues until the "next" of a task is empty, which signifies that th - `on_error` : *string* | *list* 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*\ + **(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. diff --git "a/docs/zh_cn/3.1-\344\273\273\345\212\241\346\265\201\346\260\264\347\272\277\345\215\217\350\256\256.md" "b/docs/zh_cn/3.1-\344\273\273\345\212\241\346\265\201\346\260\264\347\272\277\345\215\217\350\256\256.md" index 482586395..a2d344693 100644 --- "a/docs/zh_cn/3.1-\344\273\273\345\212\241\346\265\201\346\260\264\347\272\277\345\215\217\350\256\256.md" +++ "b/docs/zh_cn/3.1-\344\273\273\345\212\241\346\265\201\346\260\264\347\272\277\345\215\217\350\256\256.md" @@ -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 等待。 @@ -99,6 +106,10 @@ Orange 的 next 中, - `on_error` : *string* | *list* 当识别超时,或动作执行失败后,接下来会执行该列表中的任务。可选,默认空。 + +- `timeout_next`: *string* | *list*\ + **(在2.x 版本中废弃,但保留兼容性,推荐使用 `on_error` 替代)**\ + 超时后执行的任务列表。可选,默认空。 - `inverse`: *bool* 反转识别结果,识别到了当做没识别到,没识别到的当做识别到了。可选,默认 false 。