-
Notifications
You must be signed in to change notification settings - Fork 4
/
f0125.yml
54 lines (44 loc) · 1.27 KB
/
f0125.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
doc_meta: |
folder: loop
title: break recursive loop
head: |
Introduce a internal var: up_runtime_task_layer_number. It is used for a force exit or an conditional break. The typical usecase would be a business logic to attempt to maximize the possibility ub a recurisve maner in code execution to probe. For example, web page scraping and a implementation of web spider etc.
sections:
- title: Demo
log: yes
related:
refs:
- title: break cmd func
link: ../../cmd-func/c0120
- title: advanced usage of break in call func
link: ../../flow-controll/c0121
notes:
goal:
- add feature to add a internal runtime var up_runtime_task_layer_number
- it is useful for client to decide to quit or customise controll flow
tasks:
- name: task
task:
- func: call
do:
- layer2
- name: layer2
task:
- func: cmd
do:
-
name: print
cmd: 'up_runtime_task_layer_number: {{.up_runtime_task_layer_number}}'
- func: call
do:
- layer3
- name: layer3
task:
- func: cmd
do:
-
name: exit #or break
if: '{{eq .up_runtime_task_layer_number 4}}'
- func: call
do:
- layer2