fix: Use a global reference to distributed transaction and scheduler (#8462)

* fix: Add storage cleanup on scheduled jobs

* fix: Use a global reference to distributed transaction and scheduler classes
This commit is contained in:
Stevche Radevski authored and GitHub committed 2024-08-06 14:14:51 +02:00
1 parent c870302400
commit 4155d0354f
16 files changed
+121 -88

No files matched your search

@@ -1,5 +1,6 @@
import {
DistributedTransaction,
DistributedTransactionType,
DistributedTransactionEvents,
TransactionHandlerType,
TransactionStep,
@@ -178,7 +179,7 @@ export class WorkflowOrchestratorService {
transactionId: string,
options?: WorkflowOrchestratorRunOptions<undefined>,
@MedusaContext() sharedContext: Context = {}
): Promise<DistributedTransaction> {
): Promise<DistributedTransactionType> {
let { context, container } = options ?? {}
if (!workflowId) {