fix: 支付确认TOCTOU竞态(AND status=pending)+定时器补充过期订单清理
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user