mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-12-06 06:46:23 +01:00
Close three races the review found in the flow window
- Replay live changes over a page of older flows, so a slow flow that ends while the page loads is not lost from the window. - Read list_flows' page and total from one snapshot, so a flow written between them is not counted twice. - Commit a clear's flow deletion only after its bodies' deletion, so a failure leaves the flows to clear again rather than orphaned bodies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1a994f7532
commit
39a7397ebb
4 files changed
+121
-76
No files matched your search
@@ -607,8 +607,7 @@ fn list_actions(
|
||||
}
|
||||
|
||||
fn list_flows(ctx: &ProxyCtx, req: flows::FlowFilter) -> Result<ListFlowsResponse, RpcError> {
|
||||
let flows = flows::list(&ctx.db, &req).map_err(rpc_error)?;
|
||||
let total = flows::count(&ctx.db).map_err(rpc_error)?;
|
||||
let (flows, total) = flows::page(&ctx.db, &req).map_err(rpc_error)?;
|
||||
Ok(ListFlowsResponse { flows, total })
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user