fix(medusa): Remove default job age option from EventBus (#3388)

* fix(medusa): Remove default job age option from EventBus

* Create .changeset/spicy-camels-invite.md
This commit is contained in:
Oliver Windall Juhl
2023-03-06 19:41:12 +01:00
committed by GitHub
parent 6496c20800
commit aa0d1f3215
2 changed files with 6 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
fix(medusa): Remove default job age option from EventBus

View File

@@ -49,8 +49,6 @@ export type EmitOptions = {
}
} & JobOptions
const COMPLETED_JOB_TTL = 10000
/**
* Can keep track of multiple subscribers to different events and run the
* subscribers when events happen. Events will run asynchronously.
@@ -228,9 +226,7 @@ export default class EventBusService {
options: Record<string, unknown> & EmitOptions = { attempts: 1 }
): Promise<StagedJob | void> {
const opts: EmitOptions = {
removeOnComplete: {
age: COMPLETED_JOB_TTL,
},
removeOnComplete: true,
...options,
}