Move a number of sync messages to jobs for retry
This commit is contained in:
parent
74aaf7819a
commit
90356d4c0f
19 changed files with 501 additions and 373 deletions
|
@ -18,7 +18,7 @@ export async function handleMultipleSendErrors({
|
|||
errors: ReadonlyArray<unknown>;
|
||||
isFinalAttempt: boolean;
|
||||
log: Pick<LoggerType, 'info'>;
|
||||
markFailed: (() => void) | (() => Promise<void>);
|
||||
markFailed?: (() => void) | (() => Promise<void>);
|
||||
timeRemaining: number;
|
||||
}>): Promise<void> {
|
||||
strictAssert(errors.length, 'Expected at least one error');
|
||||
|
@ -50,7 +50,7 @@ export async function handleMultipleSendErrors({
|
|||
);
|
||||
|
||||
if (isFinalAttempt || serverAskedUsToStop) {
|
||||
await markFailed();
|
||||
await markFailed?.();
|
||||
}
|
||||
|
||||
if (serverAskedUsToStop) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue