Upstream commit: 9d1c75ab68435e4417337f768291e5f947686203 Enterprise-only files removed or emptied: 63 Enterprise-only snippets removed: 118 in 50 files Dangling module declarations removed: 5 Edits turning enterprise off: 25 Third-party code: 14 files, 0 not in THIRD-PARTY.md Verification: clean One snippet more than v0.16.22, in crates/common/src/auth/authentication.rs (3, was 2).
This commit is contained in:
@@ -134,4 +134,20 @@ impl TaskResult {
|
||||
max_attempts: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn deferred(retry_at: Option<u64>, message: impl Into<String>) -> Self {
|
||||
match retry_at {
|
||||
Some(retry_at) => TaskResult::Failure {
|
||||
typ: TaskFailureType::Retry(retry_at),
|
||||
message: message.into(),
|
||||
max_attempts: None,
|
||||
},
|
||||
None => TaskResult::temporary(message),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn deferred_retry_time(err: &trc::Error) -> Option<u64> {
|
||||
err.value(trc::Key::NextRetry)
|
||||
.and_then(|value| value.to_uint())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user