feat: remove job on complete and failed
This commit is contained in:
parent
f51b2b500a
commit
e130717951
|
|
@ -58,6 +58,8 @@ export class BullMqClient extends ClientProxy {
|
|||
queue
|
||||
.add(packet.pattern, packet.data, {
|
||||
jobId: packet.data.id ?? v4(),
|
||||
removeOnComplete: true,
|
||||
removeOnFail: true,
|
||||
...packet.data.options,
|
||||
})
|
||||
.then(async (job) => {
|
||||
|
|
|
|||
|
|
@ -46,10 +46,9 @@ export class BullMqServer extends Server implements CustomTransportStrategy {
|
|||
});
|
||||
});
|
||||
},
|
||||
// @ts-ignore
|
||||
{
|
||||
...this.options,
|
||||
...{ removeOnComplete: true, removeOnFail: true },
|
||||
...{ removeOnComplete: { count: 0 }, removeOnFail: { count: 0 } },
|
||||
...handler?.extras,
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue