fix(workflow-engine-*): Cleanup expired executions and reduce redis storage usage (#12795)

This commit is contained in:
Adrien de Peretti
2025-06-24 13:32:10 +02:00
committed by GitHub
parent c0807f5496
commit 316a325b63
14 changed files with 620 additions and 392 deletions
@@ -21,7 +21,6 @@ export interface IDistributedTransactionStorage {
key: string,
options?: TransactionOptions & { isCancelling?: boolean }
): Promise<TransactionCheckpoint | undefined>
list(): Promise<TransactionCheckpoint[]>
save(
key: string,
data: TransactionCheckpoint,
@@ -56,6 +55,7 @@ export interface IDistributedTransactionStorage {
transaction: DistributedTransactionType,
step: TransactionStep
): Promise<void>
clearExpiredExecutions(): Promise<void>
}
export abstract class DistributedSchedulerStorage
@@ -92,10 +92,6 @@ export abstract class DistributedTransactionStorage
throw new Error("Method 'get' not implemented.")
}
async list(): Promise<TransactionCheckpoint[]> {
throw new Error("Method 'list' not implemented.")
}
async save(
key: string,
data: TransactionCheckpoint,
@@ -149,4 +145,8 @@ export abstract class DistributedTransactionStorage
): Promise<void> {
throw new Error("Method 'clearStepTimeout' not implemented.")
}
async clearExpiredExecutions(): Promise<void> {
throw new Error("Method 'clearExpiredExecutions' not implemented.")
}
}
@@ -41,4 +41,6 @@ export class BaseInMemoryDistributedTransactionStorage extends DistributedTransa
this.storage.set(key, data)
}
}
async clearExpiredExecutions(): Promise<void> {}
}