From c77035dbb21afebba0b653e3713a5a14d562a8c9 Mon Sep 17 00:00:00 2001 From: Suphonchai Phoonsawat Date: Fri, 15 May 2026 21:53:40 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=9B=E0=B8=B1?= =?UTF-8?q?=E0=B8=8D=E0=B8=AB=E0=B8=B2=20token=20=E0=B8=96=E0=B8=B9?= =?UTF-8?q?=E0=B8=81=E0=B8=A5=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B9=84=E0=B8=9B?= =?UTF-8?q?=E0=B8=81=E0=B9=88=E0=B8=AD=E0=B8=99=E0=B8=97=E0=B8=B5=E0=B9=88?= =?UTF-8?q?=E0=B8=88=E0=B8=B0=E0=B8=AA=E0=B9=88=E0=B8=87=20notification?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Services/ImportBackgroundService.cs | 2 ++ Services/ImportJobTracker.cs | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Services/ImportBackgroundService.cs b/Services/ImportBackgroundService.cs index cf33fd5..0d3de83 100644 --- a/Services/ImportBackgroundService.cs +++ b/Services/ImportBackgroundService.cs @@ -72,6 +72,7 @@ public class ImportBackgroundService : BackgroundService _tracker.UpdateStatus(job.JobId, ImportJobStatus.Completed, job.TotalCount); await notificationService.SendImportNotificationAsync(job.Token, false, "ระบบนำเข้าข้อมูลสำเร็จ"); + job.Token = null; // Clear token after notification sent } catch (Exception ex) { @@ -79,6 +80,7 @@ public class ImportBackgroundService : BackgroundService _tracker.UpdateStatus(job.JobId, ImportJobStatus.Failed, 0, ex.Message); try { await notificationService.SendImportNotificationAsync(job.Token, true, ex.Message); } catch { } + job.Token = null; // Clear token after notification sent // cleanup minio file on failure if (!string.IsNullOrEmpty(job.ImportDocId)) diff --git a/Services/ImportJobTracker.cs b/Services/ImportJobTracker.cs index d58a37c..eed3188 100644 --- a/Services/ImportJobTracker.cs +++ b/Services/ImportJobTracker.cs @@ -72,7 +72,6 @@ public class ImportJobTracker job.CompletedAt = DateTime.Now; // Clear request data to free memory for completed/failed jobs job.Request = null; - job.Token = null; } } }