From c3dad88562dc38942509bd3baf519a8e51e23c22 Mon Sep 17 00:00:00 2001 From: Uffy Date: Tue, 23 Jul 2024 11:12:50 +0800 Subject: [PATCH] feat: sync ticket to es --- next/api/src/ticket/TicketUpdater.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/next/api/src/ticket/TicketUpdater.ts b/next/api/src/ticket/TicketUpdater.ts index 7632e5b9d..75fe409e2 100644 --- a/next/api/src/ticket/TicketUpdater.ts +++ b/next/api/src/ticket/TicketUpdater.ts @@ -309,6 +309,9 @@ export class TicketUpdater { ); this.assignRelatedInstance(ticket); + console.log("addSyncJob", ticket.id) + await searchTicketService.addSyncJob([ticket.id]); + this.saveOpsLogs(operator).catch((error) => { // TODO: Sentry console.error('[ERROR] Create OpsLog failed, error:', error); @@ -349,8 +352,6 @@ export class TicketUpdater { } - console.log("addSyncJob", ticket.id) - await searchTicketService.addSyncJob([ticket.id]); if (this.data.status && ticket.isClosed()) { durationMetricsService.createCreateMetricsJob({ ticketId: ticket.id }); }