fix job ID for background jobs
This commit is contained in:
parent
74d4799ed5
commit
b89cbe8a43
1 changed files with 2 additions and 2 deletions
|
|
@ -872,7 +872,7 @@ export class QueueService implements OnModuleInit {
|
||||||
@bindThis
|
@bindThis
|
||||||
public async createPostNoteJob(noteId: string, silent: boolean, type: 'create' | 'edit') {
|
public async createPostNoteJob(noteId: string, silent: boolean, type: 'create' | 'edit') {
|
||||||
const edit = type === 'edit';
|
const edit = type === 'edit';
|
||||||
const duplication = `${noteId}:${type}`;
|
const duplication = `${noteId}_${type}`;
|
||||||
|
|
||||||
return await this.createBackgroundTask({ type: 'post-note', noteId, silent, edit }, duplication);
|
return await this.createBackgroundTask({ type: 'post-note', noteId, silent, edit }, duplication);
|
||||||
}
|
}
|
||||||
|
|
@ -949,7 +949,7 @@ export class QueueService implements OnModuleInit {
|
||||||
|
|
||||||
// https://docs.bullmq.io/guide/jobs/deduplication
|
// https://docs.bullmq.io/guide/jobs/deduplication
|
||||||
deduplication: typeof(duplication) === 'string'
|
deduplication: typeof(duplication) === 'string'
|
||||||
? { id: `${data.type}:${duplication}` }
|
? { id: `${data.type}_${duplication}` }
|
||||||
: duplication,
|
: duplication,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue