Skip to content

Commit 89033ad

Browse files
committed
readme: update state diagram
Redraw state diagram with https://github.com/mermaid-js/mermaid . Closes #148
1 parent 05b5457 commit 89033ad

File tree

3 files changed

+16
-68
lines changed

3 files changed

+16
-68
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,22 @@ For information on the transition triggers, refer to:
321321
* description of the `timeout`, `ttl timeout`, and `ttr timeout` options in
322322
the sections of the corresponding [queue types](#queue-types).
323323

324-
![Task state diagram](./doc/images/statediagram.svg)
324+
```mermaid
325+
flowchart LR
326+
INIT((" "))--> |"put()"| READY
327+
INIT((" "))--> |"put('my_task_data', {delay = delay})"| DELAYED
328+
READY--> |"take()"| TAKEN
329+
READY--> |"delete() / ttl timeout"| DONE
330+
READY--> |"bury()"| BURIED
331+
TAKEN--> |"release() / ttr timeout"| READY
332+
TAKEN--> |"release\n(id, {delay = delay})"| DELAYED
333+
TAKEN--> |"ack() / delete()"| DONE
334+
TAKEN--> |"bury()"| BURIED
335+
BURIED--> |"delete() /\nttl timeout"| DONE
336+
BURIED--> |"kick()"| READY
337+
DELAYED--> |"timeout"| READY
338+
DELAYED--> |"delete()"| DONE
339+
```
325340

326341
# Installing
327342

doc/images/statediagram.svg

Lines changed: 0 additions & 40 deletions
This file was deleted.

doc/src/statediagram.puml

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)