Browse Source

[doc] Add example and notice about task type Dependent (#10001)

Co-authored-by: Jiajie Zhong <zhongjiajie955@gmail.com>
3.1.0-release
QuakeWang 3 years ago committed by GitHub
parent
commit
0fe75482a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 48
      docs/docs/en/guide/task/dependent.md
  2. 49
      docs/docs/zh/guide/task/dependent.md
  3. BIN
      docs/img/depend-node-en.png
  4. BIN
      docs/img/depend-node.png
  5. BIN
      docs/img/depend-node1-en.png
  6. BIN
      docs/img/depend-node2.png
  7. BIN
      docs/img/depend-node3-en.png
  8. BIN
      docs/img/depend-node3.png
  9. BIN
      docs/img/dependent-nodes-en.png
  10. BIN
      docs/img/dependent_edit.png
  11. BIN
      docs/img/tasks/demo/dependent_task01.png
  12. BIN
      docs/img/tasks/demo/dependent_task02.png
  13. BIN
      docs/img/tasks/demo/dependent_task03.png
  14. BIN
      docs/img/tasks/icons/dependent.png
  15. BIN
      docs/img/tasks/icons/python.png

48
docs/docs/en/guide/task/dependent.md

@ -1,27 +1,39 @@
# Dependent Node
# Dependent
- Dependent nodes are **dependency check nodes**. For example, process A depends on the successful execution of process B from yesterday, and the dependent node will check whether process B run successful yesterday.
## Overview
> Drag from the toolbar ![PNG](https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_DEPENDENT.png) task node to the canvas, as shown in the figure below:
Dependent nodes are **dependency check nodes**. For example, process A depends on the successful execution of process B from yesterday, and the dependent node will check whether process B run successful yesterday.
<p align="center">
<img src="/img/dependent-nodes-en.png" width="80%" />
</p>
> The dependent node provides a logical judgment function, such as checking whether the B process was successful yesterday, or whether the C process was executed successfully.
## Create Task
<p align="center">
<img src="/img/depend-node-en.png" width="80%" />
</p>
- Click `Project -> Management-Project -> Name-Workflow Definition`, and click the `Create Workflow` button to enter the DAG editing page.
- Drag from the toolbar <img src="/img/tasks/icons/dependent.png" width="15"/> task node to canvas.
> For example, process A is a weekly report task, processes B and C are daily tasks, and task A requires tasks B and C to be successfully executed every day of the last week, as shown in the figure:
## Task Parameter
<p align="center">
<img src="/img/depend-node1-en.png" width="80%" />
</p>
- **Node name**: The node name in a workflow definition is unique.
- **Run flag**: Identifies whether this node schedules normally, if it does not need to execute, select the `prohibition execution`.
- **Descriptive information**: Describe the function of the node.
- **Task priority**: When the number of worker threads is insufficient, execute in the order of priority from high to low, and tasks with the same priority will execute in a first-in first-out order.
- **Worker grouping**: Assign tasks to the machines of the worker group to execute. If `Default` is selected, randomly select a worker machine for execution.
- **Environment Name**: Configure the environment name in which run the script.
- **Times of failed retry attempts**: The number of times the task failed to resubmit.
- **Failed retry interval**: The time interval (unit minute) for resubmitting the task after a failed task.
- **Delayed execution time**: The time (unit minute) that a task delays in execution.
> If the weekly report A also needs to be executed successfully last Tuesday:
## Examples
<p align="center">
<img src="/img/depend-node3-en.png" width="80%" />
</p>
The Dependent node provides a logical judgment function, which can detect the execution of the dependent node according to the logic.
For example, process A is a weekly task, processes B and C are daily tasks, and task A requires tasks B and C to be successfully executed every day of the last week.
![dependent_task01](/img/tasks/demo/dependent_task01.png)
And another example is that process A is a weekly report task, processes B and C are daily tasks, and task A requires tasks B or C to be successfully executed every day of the last week:
![dependent_task02](/img/tasks/demo/dependent_task02.png)
If the weekly report A also needs to be executed successfully last Tuesday:
![dependent_task03](/img/tasks/demo/dependent_task03.png)

49
docs/docs/zh/guide/task/dependent.md

@ -1,27 +1,40 @@
# 依赖节点
# Dependent 节点
- 依赖节点,就是**依赖检查节点**。比如A流程依赖昨天的B流程执行成功,依赖节点会去检查B流程在昨天是否有执行成功的实例。
## 综述
> 拖动工具栏中的![PNG](https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_DEPENDENT.png)任务节点到画板中,如下图所示:
Dependent 节点,就是**依赖检查节点**。比如 A 流程依赖昨天的 B 流程执行成功,依赖节点会去检查 B 流程在昨天是否有执行成功的实例。
<p align="center">
<img src="/img/dependent_edit.png" width="80%" />
</p>
## 创建任务
> 依赖节点提供了逻辑判断功能,比如检查昨天的B流程是否成功,或者C流程是否执行成功。
- 点击项目管理 -> 项目名称 -> 工作流定义,点击“创建工作流”按钮,进入 DAG 编辑页面;
- 拖动工具栏的<img src="/img/tasks/icons/dependent.png" width="15"/> 任务节点到画板中。
<p align="center">
<img src="/img/depend-node.png" width="80%" />
</p>
## 任务参数
> 例如,A流程为周报任务,B、C流程为天任务,A任务需要B、C任务在上周的每一天都执行成功,如图示:
- 节点名称:设置任务节点的名称。一个工作流定义中的节点名称是唯一的。
- 运行标志:标识这个结点是否能正常调度,如果不需要执行,可以打开禁止执行开关。
- 描述:描述该节点的功能。
- 任务优先级:worker 线程数不足时,根据优先级从高到低依次执行,优先级一样时根据先进先出原则执行。
- Worker 分组:任务分配给 worker 组的机器执行,选择 Default ,会随机选择一台 worker 机执行。
- 环境名称:配置运行脚本的环境。
- 失败重试次数:任务失败重新提交的次数。
- 失败重试间隔:任务失败重新提交任务的时间间隔,以分为单位。
- 超时警告:勾选超时警告、超时失败,当任务超过“超时时长”后,会发送告警邮件并且任务执行失败。
- 添加依赖:需要判断的依赖任务,可以是某一个项目中的工作流具体的任务执行情况。
- 前置任务:选择当前任务的前置任务,会将被选择的前置任务设置为当前任务的上游。
<p align="center">
<img src="/img/depend-node2.png" width="80%" />
</p>
## 任务样例
> 假如,周报A同时还需要自身在上周二执行成功:
Dependent 节点提供了逻辑判断功能,可以按照逻辑来检测所依赖节点的执行情况。
<p align="center">
<img src="/img/depend-node3.png" width="80%" />
</p>
例如,A 流程为周报任务,B、C 流程为天任务,A 任务需要 B、C 任务在上周的每一天都执行成功,如图示:
![dependent_task01](/img/tasks/demo/dependent_task01.png)
例如,A 流程为周报任务,B、C 流程为天任务,A 任务需要 B 或 C 任务在上周的每一天都执行成功,如图示:
![dependent_task02](/img/tasks/demo/dependent_task02.png)
假如,周报 A 同时还需要自身在上周二执行成功:
![dependent_task03](/img/tasks/demo/dependent_task03.png)

BIN
docs/img/depend-node-en.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 485 KiB

BIN
docs/img/depend-node.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

BIN
docs/img/depend-node1-en.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 KiB

BIN
docs/img/depend-node2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

BIN
docs/img/depend-node3-en.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 468 KiB

BIN
docs/img/depend-node3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

BIN
docs/img/dependent-nodes-en.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

BIN
docs/img/dependent_edit.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

BIN
docs/img/tasks/demo/dependent_task01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

BIN
docs/img/tasks/demo/dependent_task02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

BIN
docs/img/tasks/demo/dependent_task03.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

BIN
docs/img/tasks/icons/dependent.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

BIN
docs/img/tasks/icons/python.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Loading…
Cancel
Save