feat: 优化风控相关的细节处理 (#527)

This commit is contained in:
ᴀᴍᴛᴏᴀᴇʀ
2025-11-08 00:41:07 +08:00
committed by GitHub
parent 8ac6829e61
commit c69a88f1da
9 changed files with 79 additions and 59 deletions

View File

@@ -1,15 +1,6 @@
use std::io;
use anyhow::Result;
use thiserror::Error;
#[derive(Error, Debug)]
#[error("Request too frequently")]
pub struct DownloadAbortError();
#[derive(Error, Debug)]
#[error("Process page error")]
pub struct ProcessPageError();
pub enum ExecutionStatus {
Skipped,
@@ -17,7 +8,7 @@ pub enum ExecutionStatus {
Ignored(anyhow::Error),
Failed(anyhow::Error),
// 任务可以返回该状态固定自己的 status
FixedFailed(u32, anyhow::Error),
Fixed(u32),
}
// 目前 stable rust 似乎不支持自定义类型使用 ? 运算符,只能先在返回值使用 Result再这样套层娃