fix: 支付确认TOCTOU竞态(AND status=pending)+定时器补充过期订单清理

This commit is contained in:
2026-06-10 14:11:47 +08:00
parent c00e391c9b
commit e672f00b66
2 changed files with 14 additions and 4 deletions

View File

@@ -275,6 +275,9 @@ async fn main() -> std::io::Result<()> {
// 会员到期前 7 天提醒
let _ = db::check_member_expiry_soon(&pool_clone).await;
// 清理超过 24 小时的过期待支付订单
let _ = db::cleanup_expired_pending_orders(&pool_clone, None).await;
// 清理过期的 refresh_token
let _ = db::cleanup_expired_refresh_tokens(&pool_clone).await;
}