From 6bfd7c784d5b85b61fd753cb4ea61591a4677ecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20Ioni=C8=9B=C4=83?= Date: Sun, 1 Dec 2024 22:44:41 +0200 Subject: [PATCH] fix: handle missing files import (#133) --- .../Y2024/M12/Parliament/Records/ImportCountyRecordsJob.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Jobs/Y2024/M12/Parliament/Records/ImportCountyRecordsJob.php b/app/Jobs/Y2024/M12/Parliament/Records/ImportCountyRecordsJob.php index 23468e6..37982e5 100644 --- a/app/Jobs/Y2024/M12/Parliament/Records/ImportCountyRecordsJob.php +++ b/app/Jobs/Y2024/M12/Parliament/Records/ImportCountyRecordsJob.php @@ -45,7 +45,10 @@ public function handle(): void $path = $this->scheduledJob->getSourcePath("{$this->filename}.csv"); if (! $disk->exists($path)) { - throw new MissingSourceFileException($path); + // throw new MissingSourceFileException($path); + logger()->warning('Missing source file', ['path' => $path]); + + return; } $reader = Reader::createFromStream($disk->readStream($path));