mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 09:45:36 +08:00
feat(ql3): add postgres cancellation dispatch
This commit is contained in:
1 parent
36035ac43e
commit
1809fbb8d3
29 files changed
+2265
-133
No files matched your search
@@ -10,12 +10,15 @@ export interface ClaimCancellationDispatchCommand {
|
||||
requestedAtMs: number;
|
||||
owner: string;
|
||||
leaseToken: string;
|
||||
nowMs: number;
|
||||
leaseDurationMs: number;
|
||||
}
|
||||
|
||||
export type ClaimCancellationDispatchResult =
|
||||
| { status: 'claimed'; dispatch: CancellationDispatchRecord }
|
||||
| {
|
||||
status: 'claimed';
|
||||
dispatch: CancellationDispatchRecord;
|
||||
leaseToken: string;
|
||||
}
|
||||
| { status: 'not_eligible' }
|
||||
| {
|
||||
status: 'not_due' | 'leased' | 'dispatched' | 'blocked';
|
||||
@@ -29,8 +32,7 @@ export interface RecordCancellationDispatchResultCommand {
|
||||
leaseToken: string;
|
||||
expectedVersion: number;
|
||||
result: CancellationDispatchResult;
|
||||
atMs: number;
|
||||
nextAttemptAtMs?: number;
|
||||
retryDelayMs?: number;
|
||||
eventId: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user