fix: raise TradeSnap request timeout from 15s to 30s

The first screenshot request of each batch pays extra browser-session
cleanup time in TradeSnap (~16s total), which the 15s client timeout
misclassified as a failure while the capture actually succeeded.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
0xcathiefish
2026-07-05 08:38:04 +00:00
parent 3f7a16aa45
commit 6c73ab0d09
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -5,6 +5,7 @@
## [Unreleased]
### Fixed
- 将 TradeSnap 截图请求超时从 15 秒提高到 30 秒:每轮第一个截图请求(通常是 15m)需额外等待浏览器会话清理,约 16 秒完成,此前会被 15 秒超时误判为失败。
- 修复加仓成交被静默忽略的问题:开仓判断从 `start_position == 0` 改为使用 Hyperliquid 的 `dir` 字段(`Open Long` / `Open Short`),已有持仓时的加仓现在也会写入 Notion。
- 修复同一订单(`oid`)慢速多笔成交被截断的问题:聚合由「首笔成交后固定 500 毫秒窗口」改为「3 秒防抖」,每笔新成交重置计时器,静默 3 秒后才汇总发送,避免写入的数量小于实际成交量。
- `PositionTradeEvent` 现在携带真实的 `start_pos` / `end_pos`,并区分 `Open`(从零开仓)与 `Increase`(加仓)动作。
+1 -1
View File
@@ -232,7 +232,7 @@ impl NotionWriter {
};
let tradesnap_url = url.trim_end_matches('/');
let http_client = reqwest::Client::builder()
.timeout(std::time::Duration::from_secs(15))
.timeout(std::time::Duration::from_secs(30))
.build()
.unwrap_or_else(|_| reqwest::Client::new());
let mut children = Vec::new();