refactor(task): move retry primitives into the task crate

This commit is contained in:
Tunglies
2026-12-03 17:20:32 +08:00
parent 0bc38ba664
commit 911a3c58fa
13 changed files with 69 additions and 69 deletions
+7 -4
View File
@@ -68,8 +68,10 @@ async fn perform_profile_update(
System,
}
let result =
crate::utils::retry::try_strategies(Strategy::Configured, [Strategy::Clash, Strategy::System], |strategy| {
let result = clash_verge_task::retry::try_strategies(
Strategy::Configured,
[Strategy::Clash, Strategy::System],
|strategy| {
let mut options = merged_opt.clone();
async move {
let (name, success, failure) = match strategy {
@@ -117,8 +119,9 @@ async fn perform_profile_update(
}
result
}
})
.await;
},
)
.await;
let last_err = match result {
Ok((strategy, refresh)) => {
// A persistence error must not replay a successful download with another transport.