Move a number of sync messages to jobs for retry

This commit is contained in:
Scott Nonnenberg 2022-01-14 13:34:52 -08:00 committed by GitHub
parent 74aaf7819a
commit 90356d4c0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 501 additions and 373 deletions

View file

@ -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) {