Message416323
I'm using my graph library to manage a list of tasks that need doing in some sort of proper order. One task may spawn other tasks at runtime, and we don't necessarily know what the tasks will be until runtime. It's way more convenient to simply add such tasks on demand, rather than trying to preemptively pre-add all such possible tasks before preparing the graph, or creating additional graphs.
For example, consider a tool that downloads and digests zip files full of music from an online store. Your initial tasks might represent "download the zip file", then "decompress and examine the contents of the zip file". You could then iterate over the contents of the zip file, adding different tasks based on what you find--one pipeline of tasks for media files (FLAC/MP3/OGG/etc), another for the playlist, a third if you don't *find* a playlist, a fourth for image files, etc. (Not that you'd necessarily write such a tool this way, but it's at least plausible.)
The new nodes needn't be connected to the existing nodes for this to still be useful. You could reuse the same graph object for all your tasks. |
|
Date |
User |
Action |
Args |
2022-03-30 06:06:50 | larry | set | recipients:
+ larry, tim.peters, eric.smith, pablogsal, Dennis Sweeney |
2022-03-30 06:06:50 | larry | set | messageid: <1648620410.18.0.679764336431.issue47145@roundup.psfhosted.org> |
2022-03-30 06:06:50 | larry | link | issue47145 messages |
2022-03-30 06:06:49 | larry | create | |
|