feat: run nested async workflows (#9119)

This commit is contained in:
Carlos R. L. Rodrigues
2024-09-16 10:06:45 -03:00
committed by GitHub
parent 0bcdcccbe2
commit ef8dc4087e
23 changed files with 295 additions and 100 deletions

View File

@@ -66,16 +66,16 @@ export class RedisDistributedTransactionStorage
}
async onApplicationStart() {
const allowedJobs = [
JobType.RETRY,
JobType.STEP_TIMEOUT,
JobType.TRANSACTION_TIMEOUT,
]
this.worker = new Worker(
this.queueName,
async (job) => {
const allJobs = [
JobType.RETRY,
JobType.STEP_TIMEOUT,
JobType.TRANSACTION_TIMEOUT,
]
if (allJobs.includes(job.name as JobType)) {
if (allowedJobs.includes(job.name as JobType)) {
await this.executeTransaction(
job.data.workflowId,
job.data.transactionId