Skip to content

Commit d460478

Browse files
committed
JS doc for flush method.
1 parent be3f37b commit d460478

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/outbox-core/lib/storage.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ export interface OutboxStorage<SupportedEvents extends CommonEventDefinition[]>
1515
outboxEntry: OutboxEntry<SupportedEvents[number]>,
1616
): Promise<OutboxEntry<SupportedEvents[number]>>
1717

18+
/**
19+
* Responsible for taking all entries from the accumulator and persisting them in the storage.
20+
*
21+
* - Items that are in OutboxAccumulator::getEntries MUST be changed to SUCCESS status and `updatedAt` field needs to be set.
22+
* - Items that are in OutboxAccumulator::getFailedEntries MUST be changed to FAILED status, `updatedAt` field needs to be set and retryCount needs to be incremented.
23+
*/
1824
flush(outboxAccumulator: OutboxAccumulator<SupportedEvents>): Promise<void>
1925

2026
/**

0 commit comments

Comments
 (0)