fix: pass cursor=0 to knot events for full history, increase timeout
Author: Aaron Steven White
Commit
3f1947a700c63afde23116a1072d9221825236cfParent: f001483029
Structural diff unavailable
These commits were pushed via plain git push, so no pre-parsed
schemas are available. Install git-remote-cospan and re-push via panproto:// to
see scope-level changes, breaking change detection, and semantic diffs.
brew install panproto/tap/git-remote-cospan1 file changed +9 -3
@@ -80,9 +80,15 @@ async fn discover_and_consume(state: &Arc<AppState>) -> anyhow::Result<()> {
8080 8181 /// Connect to a single knot's event stream and process events. 8282 async fn consume_knot(state: &Arc<AppState>, url: &str) -> anyhow::Result<()> { 83+ // Pass cursor=0 to get ALL historical events from the knot 84+ let url_with_cursor = if url.contains('?') { 85+ format!("{url}&cursor=0") 86+ } else { 87+ format!("{url}?cursor=0") 88+ }; 8389 let (ws, _) = tokio::time::timeout( 8490 std::time::Duration::from_secs(10), 85- connect_async(url), 91+ connect_async(&url_with_cursor), 8692 ) 8793 .await 8894 .map_err(|_| anyhow::anyhow!("connection timeout"))??;
@@ -90,9 +96,9 @@ async fn consume_knot(state: &Arc<AppState>, url: &str) -> anyhow::Result<()> {
9096 let (_, mut read) = ws.split(); 9197 let mut count = 0u64; 9298 93- // Read events with a timeout per message 99+ // Read events with a timeout per message (2 min for historical replay) 94100 while let Ok(Some(msg)) = tokio::time::timeout( 95- std::time::Duration::from_secs(30), 101+ std::time::Duration::from_secs(120), 96102 read.next(), 97103 ) 98104 .await