From 0dc8abb76fe677bd3210896f9c144d2fedbf3db6 Mon Sep 17 00:00:00 2001 From: Hosteroid Date: Tue, 21 Oct 2025 10:19:42 +0300 Subject: [PATCH] Add status parameter to import completion on failure Updates calls to importLogModel->completeImport in exception handlers to include a 'failed' status parameter, ensuring clearer logging of failed import operations. --- app/Services/TldRegistryService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Services/TldRegistryService.php b/app/Services/TldRegistryService.php index f125e3c..a296799 100644 --- a/app/Services/TldRegistryService.php +++ b/app/Services/TldRegistryService.php @@ -315,7 +315,7 @@ class TldRegistryService $this->importLogModel->completeImport($logId, $stats); } catch (\Exception $e) { - $this->importLogModel->completeImport($logId, $stats, $e->getMessage()); + $this->importLogModel->completeImport($logId, $stats, 'failed', $e->getMessage()); throw $e; } @@ -385,7 +385,7 @@ class TldRegistryService $this->importLogModel->completeImport($logId, $stats); } catch (\Exception $e) { - $this->importLogModel->completeImport($logId, $stats, $e->getMessage()); + $this->importLogModel->completeImport($logId, $stats, 'failed', $e->getMessage()); throw $e; } @@ -435,7 +435,7 @@ class TldRegistryService $this->importLogModel->completeImport($logId, $stats); } catch (\Exception $e) { - $this->importLogModel->completeImport($logId, $stats, $e->getMessage()); + $this->importLogModel->completeImport($logId, $stats, 'failed', $e->getMessage()); throw $e; } @@ -1982,7 +1982,7 @@ class TldRegistryService $this->importLogModel->completeImport($logId, $stats); } catch (\Exception $e) { - $this->importLogModel->completeImport($logId, $stats, $e->getMessage()); + $this->importLogModel->completeImport($logId, $stats, 'failed', $e->getMessage()); throw $e; }