fix(workflow-engine-*): Cleanup expired executions and reduce redis storage usage (#12795)
This commit is contained in:
@@ -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> {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user