dora-rs / dora

DORA (Dataflow-Oriented Robotic Architecture) is middleware designed to streamline and simplify the creation of AI-based robotic applications. It offers low latency, composable, and distributed dataflow capabilities. Applications are modeled as directed graphs, also referred to as pipelines.
https://dora-rs.ai
Apache License 2.0
1.5k stars 79 forks source link

List failed and finished dataflows in `dora list` #554

Closed phil-opp closed 3 months ago

phil-opp commented 3 months ago

List failed and finished dataflows on dora list, in addition to the active ones. This makes it easier to find out whether a started dataflow was successful or not.

Example Output:

❯ dora list
No dataflows are running
Failed dataflows:
- [grateful-song] 019010f5-9235-7d67-8fbc-1e82c16a8334
Finished dataflows:
- [nasty-statement] 019010f2-cb23-7274-bc2e-f383506770a0
- [pretty-carpenter] 019010f2-e297-74fc-a765-8b80e4e1ab97
- [encouraging-cough] 019010f3-a788-748c-9196-6104d58cd9d
haixuanTao commented 3 months ago

Could be good to represent them within a table format instead of a list format in line with docker ps:

See: https://docs.docker.com/reference/cli/docker/container/ls/

We could list running dataflow first and finished dataflow at the end.

haixuanTao commented 3 months ago

For the tab we can probably just use this: https://github.com/BurntSushi/tabwriter

phil-opp commented 3 months ago

Good idea! Implemented in cdb3123f.

The output now looks like this:

❯ dora list
UUID                                  Name           Status
01903615-7737-7e5f-8c28-3670b8a66c30  roasted-stove  FAILED
01903616-4be7-7150-a47f-be39e88d9e5a  proud-angle    finished
phil-opp commented 3 months ago

Sure, I renamed the status fields in d2e2eef9. I also refactored the message a bit in 262f39fb to make the ordering more consistent (failed and succeeded dataflows are now listed chronologically instead of in separate groups).

Feel free to merge if this looks good to you now!