mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-01 18:50:04 +08:00
refactor(task): move retry primitives into the task crate
This commit is contained in:
@@ -76,8 +76,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 {
|
||||
@@ -125,8 +127,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.
|
||||
|
||||
Reference in New Issue
Block a user