Add durations
utility for computing durations
This commit is contained in:
parent
c6aa668a9b
commit
f86f753df9
28 changed files with 99 additions and 95 deletions
|
@ -1,10 +1,10 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import * as moment from 'moment';
|
||||
import * as durations from './durations';
|
||||
|
||||
const BACKOFF_FACTOR = 1.9;
|
||||
const MAX_BACKOFF = moment.duration(15, 'minutes').asMilliseconds();
|
||||
const MAX_BACKOFF = 15 * durations.MINUTE;
|
||||
|
||||
/**
|
||||
* For a given attempt, how long should we sleep (in milliseconds)?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue