fix: reqwest Client添加10s超时防止登录请求挂起阻塞worker
This commit is contained in:
@@ -239,7 +239,11 @@ async fn main() -> std::io::Result<()> {
|
||||
}
|
||||
};
|
||||
|
||||
let http_client = Client::new();
|
||||
let http_client = Client::builder()
|
||||
.timeout(std::time::Duration::from_secs(10))
|
||||
.connect_timeout(std::time::Duration::from_secs(5))
|
||||
.build()
|
||||
.expect("创建 HTTP 客户端失败");
|
||||
|
||||
// 启动时清理:过期订单 + 过期登录码
|
||||
match db::cleanup_expired_pending_orders(&pool, None).await {
|
||||
|
||||
Reference in New Issue
Block a user