Skip to content

Commit 896578a

Browse files
authored
feat: update rule-engine any_order, add cocli batch download example (#146)
1 parent c1e7a6c commit 896578a

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

docs/4-recipes/9-data-diagnosis/5-rule-engine.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,16 @@ log_level == LogLevel.FATAL # 每当出现 FATAL 日志时触发
193193

194194
- **any_order**
195195

196-
`any_order(condition1, condition2, ...)`
196+
`any_order(condition1, condition2, ..., reset_time)`
197197

198198
所有 condition 被触发,无视触发数顺序
199+
200+
如果 `reset_time` 被设置,如果在第一个 `conditioni` 被触发后 `reset_time` 时间内没有触发所有的 `conditioni`,则状态被重置。
199201

200202
```python
201203
any_order("123" in log, "789" in log, "456" in log)
204+
205+
any_order("123" in log, "789" in log, "456" in log, reset_time=10)
202206
```
203207

204208
<br />

docs/6-cli/4-cli-common-batch-tasks.md

+9
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,15 @@ for id in $(cocli record list | grep -v 'ID' | cut -d ' ' -f1); do
8484
done
8585
```
8686

87+
### 批量下载所有有特定标签的记录到文件夹
88+
89+
```bash
90+
for id in $(cocli record list -v | grep 'test-label' | cut -d ' ' -f1); do
91+
# 下载所有有 test-label 标签的记录
92+
cocli record download $id download-folder
93+
done
94+
```
95+
8796
### 删除所有空记录
8897

8998
:::danger

0 commit comments

Comments
 (0)