Skip to content

Commit

Permalink
feat(next/api): print ticket detect info
Browse files Browse the repository at this point in the history
  • Loading branch information
uffy committed May 23, 2024
1 parent f2aca27 commit 58c2db2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions next/api/src/service/ticket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ export class TicketService {
},
});
this.detectLangQueue.process((job) => {
if (job.attemptsMade > 1) {
console.log(`[TicketService] ticket ${job.data.ticketId} detect language job failed ${job.attemptsMade} times`);
}
return this.detectTicketLanguage(job.data.ticketId);
});
}
Expand Down Expand Up @@ -165,6 +162,8 @@ export class TicketService {
}

const translateResult = await translateService.translate(text);
console.log(`[TicketService] detecting language for ticket ${ticket.id}: ${text}, result: ${JSON.stringify(translateResult)}`);

if (!translateResult) {
return;
}
Expand Down

0 comments on commit 58c2db2

Please sign in to comment.