fix(api): translation job IDs must not contain ':' #62
@@ -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`);
|
||||
|
||||
Reference in New Issue
Block a user