fix(api): translation job IDs must not contain ':' #62

Merged
root merged 1 commits from dev into main 2026-05-27 17:51:28 +03:00

View File

@@ -290,8 +290,9 @@ export class TranslationsService {
await this.translationQueue.add(
"translate",
{ terms: chunk },
// jobId hashes the chunk so identical retries collapse
{ jobId: `tr:${Buffer.from(chunk.sort().join("|")).toString("base64").slice(0, 32)}` },
// jobId hashes the chunk so identical retries collapse.
// 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`);