add parent config

This commit is contained in:
Hongbo Wu 2024-02-02 11:49:02 +08:00
parent 1bccf33320
commit 9c28726a9b

View file

@ -66,11 +66,12 @@ export const bulkAction = async (data: BulkActionData, id?: string) => {
try {
await queue.add(BATCH_UPDATE_JOB_NAME, data, {
attempts: 1,
priority: 10,
priority: 5,
jobId, // deduplication
removeOnComplete: true,
removeOnFail: true,
parent, // for tracking
removeDependencyOnFailure: true,
})
} catch (error) {
logger.error('Error enqueuing batch update job', error)