fix(api): translation job IDs must not contain ':'
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Same BullMQ 5.68 restriction as the prefetch fix (acd5691): a custom job ID
containing ':' is rejected with "Custom Id cannot contain :". enqueueTranslation
built jobId `tr:<base64>`, so every enqueue threw — and both call sites
fire-and-forget with .catch(warn), so it failed silently: fresh terms were
NX-flagged as queued but never actually enqueued, leaving new EMEX/PCAT terms
untranslated (English). Use 'tr-' prefix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -290,8 +290,9 @@ export class TranslationsService {
|
|||||||
await this.translationQueue.add(
|
await this.translationQueue.add(
|
||||||
"translate",
|
"translate",
|
||||||
{ terms: chunk },
|
{ terms: chunk },
|
||||||
// jobId hashes the chunk so identical retries collapse
|
// jobId hashes the chunk so identical retries collapse.
|
||||||
{ jobId: `tr:${Buffer.from(chunk.sort().join("|")).toString("base64").slice(0, 32)}` },
|
// Prefix uses "-" not ":" — BullMQ rejects custom job IDs containing ":".
|
||||||
|
{ jobId: `tr-${Buffer.from(chunk.sort().join("|")).toString("base64").slice(0, 32)}` },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
this.logger.debug(`Enqueued ${fresh.length} term(s) for async translation`);
|
this.logger.debug(`Enqueued ${fresh.length} term(s) for async translation`);
|
||||||
|
|||||||
Reference in New Issue
Block a user