-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathChain.yaml
More file actions
40 lines (35 loc) · 1.21 KB
/
Chain.yaml
File metadata and controls
40 lines (35 loc) · 1.21 KB
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
# Multi-task chain example
# Equivalent to samples/Chain.sql but simplified
chains:
- name: "chain operation"
schedule: "* * * * *" # Every minute
live: true
max_instances: 1
self_destruct: false
exclusive: false
tasks:
- name: "Initialize chain log table"
kind: "SQL"
command: |
CREATE TABLE IF NOT EXISTS timetable.chain_log (
chain_log BIGSERIAL,
EVENT TEXT,
time TIMESTAMPTZ,
PRIMARY KEY (chain_log)
)
ignore_error: true
- name: "Log chain start"
kind: "SQL"
command: "INSERT INTO timetable.chain_log (EVENT, time) VALUES ($1, CURRENT_TIMESTAMP)"
parameters: ["Chain started"]
ignore_error: true
- name: "Log chain processing"
kind: "SQL"
command: "INSERT INTO timetable.chain_log (EVENT, time) VALUES ($1, CURRENT_TIMESTAMP)"
parameters: ["Chain processing"]
ignore_error: true
- name: "Log chain completion"
kind: "SQL"
command: "INSERT INTO timetable.chain_log (EVENT, time) VALUES ($1, CURRENT_TIMESTAMP)"
parameters: ["Chain completed"]
ignore_error: true