Retry outbound reactions for up to a day

This commit is contained in:
Evan Hahn 2021-10-29 18:19:44 -05:00 committed by GitHub
parent 4a6b7968c1
commit 8670a4d864
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 1444 additions and 473 deletions

View file

@ -24,7 +24,10 @@ export class TestJobQueueStore implements JobQueueStore {
});
}
async insert(job: Readonly<StoredJob>): Promise<void> {
async insert(
job: Readonly<StoredJob>,
{ shouldPersist = true }: Readonly<{ shouldPersist?: boolean }> = {}
): Promise<void> {
await fakeDelay();
this.storedJobs.forEach(storedJob => {
@ -33,7 +36,9 @@ export class TestJobQueueStore implements JobQueueStore {
}
});
this.storedJobs.push(job);
if (shouldPersist) {
this.storedJobs.push(job);
}
this.getPipe(job.queueType).add(job);