mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-22 20:43:05 +00:00
Adjust retry interval for sending activities (#2141)
This commit is contained in:
parent
5265f6100e
commit
a10bf7d410
1 changed files with 12 additions and 1 deletions
|
@ -72,8 +72,19 @@ impl ActixJob for SendActivityTask {
|
|||
type Future = Pin<Box<dyn Future<Output = Result<(), Error>>>>;
|
||||
const NAME: &'static str = "SendActivityTask";
|
||||
|
||||
/// With these params, retries are made at the following intervals:
|
||||
/// 3s
|
||||
/// 9s
|
||||
/// 27s
|
||||
/// 1m 21s
|
||||
/// 4m 3s
|
||||
/// 12m 9s
|
||||
/// 36m 27s
|
||||
/// 1h 49m 21s
|
||||
/// 5h 28m 3s
|
||||
/// 16h 24m 9s
|
||||
const MAX_RETRIES: MaxRetries = MaxRetries::Count(10);
|
||||
const BACKOFF: Backoff = Backoff::Exponential(2);
|
||||
const BACKOFF: Backoff = Backoff::Exponential(3);
|
||||
|
||||
fn run(self, state: Self::State) -> Self::Future {
|
||||
Box::pin(async move { do_send(self, &state.client).await })
|
||||
|
|
Loading…
Reference in a new issue