summaryrefslogtreecommitdiff
path: root/.trash/Persistence.md
blob: 682b88e5aa5de2b82d48bcec7ea088340b408742 (plain)
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
---
tags:
  - taskflow
references:
  - https://docs.openstack.org/taskflow/latest/user/persistence.html
---
Main interface is called Backend.

**prep**
Backend + (Logbook ->) Flow Detail -> Engine -> Storage 

**execution**
inspect existing atom details -> find unfinished -> inspect graph -> run atoms

**post exec**
destroy logbook, clear backend
can be configured to keep those things around for any purpose

> Logbook is the authoritive source of run-time state. Logbook written first, then persisted.

Namespace: `taskflow.persistence`.
```
from taskflow.persistence import backends

...
persistence = backends.fetch(conf={
    "connection": "mysql",
    "user": ...,
    "password": ...,
})

logbookj
```

Types:
- memory (connection: memoery)
- files (connection: dir | file)
	- https://docs.openstack.org/taskflow/latest/user/persistence.html#id5
- sqlalchemy (connection: mysql | postgres | sqlite)
- zookeper (connection: zookeeper)