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:
committed by
GitHub
parent
6496c20800
commit
aa0d1f3215
5
.changeset/spicy-camels-invite.md
Normal file
5
.changeset/spicy-camels-invite.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/medusa": patch
|
||||
---
|
||||
|
||||
fix(medusa): Remove default job age option from EventBus
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user