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.
This commit is contained in:
Hosteroid
2025-10-21 10:19:42 +03:00
parent 6d67e828ab
commit 0dc8abb76f

View File

@@ -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;
}