diff --git a/README.md b/README.md index 62ceea0c..6d112a44 100644 --- a/README.md +++ b/README.md @@ -321,7 +321,22 @@ For information on the transition triggers, refer to: * description of the `timeout`, `ttl timeout`, and `ttr timeout` options in the sections of the corresponding [queue types](#queue-types). -![Task state diagram](./doc/images/statediagram.svg) +```mermaid +flowchart LR + INIT((" "))--> |"put()"| READY + INIT((" "))--> |"put('my_task_data', {delay = delay})"| DELAYED + READY--> |"take()"| TAKEN + READY--> |"delete() / ttl timeout"| DONE + READY--> |"bury()"| BURIED + TAKEN--> |"release() / ttr timeout"| READY + TAKEN--> |"release\n(id, {delay = delay})"| DELAYED + TAKEN--> |"ack() / delete()"| DONE + TAKEN--> |"bury()"| BURIED + BURIED--> |"delete() /\nttl timeout"| DONE + BURIED--> |"kick()"| READY + DELAYED--> |"timeout"| READY + DELAYED--> |"delete()"| DONE +``` # Installing diff --git a/doc/images/statediagram.svg b/doc/images/statediagram.svg deleted file mode 100644 index cc5b5a4d..00000000 --- a/doc/images/statediagram.svg +++ /dev/null @@ -1,40 +0,0 @@ -READYDELAYEDTAKENDONEBURIEDput()put('my_task_data',{ delay = delay })take()release() /ttr timeoutdelete() /ttl timeoutbury()kick()release(id, { delay = delay })ack() / delete()bury()delete() /ttl timeouttimeoutdelete()remove executed task \ No newline at end of file diff --git a/doc/src/statediagram.puml b/doc/src/statediagram.puml deleted file mode 100644 index 0b554634..00000000 --- a/doc/src/statediagram.puml +++ /dev/null @@ -1,27 +0,0 @@ -/' This code is for generating the task state diagram in SVG format. -Use any PlantUML rendering service, for example, https://www.planttext.com/. -To generate the diagram on the page of this service: -1. In the left pane, copy and paste the code or select this source file - statediagram.puml with the "File Manager" button. -2. Click "Refresh". The resulting diagram is displayed in the right pane. -3. Click SVG link below the diagram view and download the diagram file. -4. Rename the file into "statediagram.svg" and upload in the ./doc/images/ - folder. -'/ - -@startuml -[*] -down-> READY : put() -[*] -down-> DELAYED : put('my_task_data',\n{ delay = delay }) -READY -down-> TAKEN : take() -READY -down-> DONE : delete() /\nttl timeout -READY -down-> BURIED : bury() -TAKEN -up-> READY : release() /\nttr timeout -TAKEN -left-> DELAYED : release\n(id, { delay = delay }) -TAKEN -down-> DONE : ack() / delete() -TAKEN -right-> BURIED : bury() -BURIED -down-> DONE : delete() /\nttl timeout -BURIED -up-> READY : kick() -DELAYED -up-> READY : timeout -DELAYED -down-> DONE : delete() -DONE -down-> [*] : remove executed task -@enduml