Update flow diagrams for event bus architecture, cancel cleanup, and SubscribeEvents
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/claude-agent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -113,6 +113,21 @@ note right #lightblue: "Download started"
|
||||
Workflow ->> Client: MonitorAlbumResponse
|
||||
note right #lightgreen: Final result
|
||||
|
||||
== Cancel Cleanup (Disconnect or Cancel Message) ==
|
||||
|
||||
note over Client, QBit #salmon
|
||||
**Manual Mode: Disconnect = Cancel**
|
||||
|
||||
When client disconnects or sends CancelRequest:
|
||||
1. Workflow context is cancelled (stops further processing)
|
||||
2. If torrent was added to qBit: **DeleteTorrent(hash)** removes it + files
|
||||
3. If download record exists: marked as **cancelled** in DB
|
||||
4. workflow_run marked as **cancelled** in DB
|
||||
5. All events persisted to album_events for audit trail
|
||||
|
||||
Cleanup uses a fresh context (not the cancelled one).
|
||||
end note
|
||||
|
||||
== Decision Points Summary ==
|
||||
|
||||
note over Client, QBit #lightyellow
|
||||
|
||||
Reference in New Issue
Block a user