fix(sync): close local queue semantic merge gap
ci/woodpecker/pr/ci Pipeline was successful

This commit is contained in:
2026-08-02 23:16:09 -05:00
parent 906ad8dc30
commit b8844e1ff0
5 changed files with 62 additions and 2 deletions
+7
View File
@@ -199,7 +199,14 @@ export class QueueService implements OnModuleInit, OnModuleDestroy {
* safe retirement of previously registered system-wide jobs.
*/
async removeRepeatableJobs(queueName: string, jobName: string): Promise<number> {
if (!this.enabled) {
this.logger.debug(
`Skipping repeatable-job removal for "${jobName}" on "${queueName}" (local tier — BullMQ disabled)`,
);
return 0;
}
const queue = this.getQueue(queueName);
if (!queue) return 0;
const jobs = await queue.getRepeatableJobs();
const matchingJobs = jobs.filter((job) => job.name === jobName);
await Promise.all(matchingJobs.map((job) => queue.removeRepeatableByKey(job.key)));