diff --git a/src/nwp_consumer/internal/services/archiver_service.py b/src/nwp_consumer/internal/services/archiver_service.py index 4d967ac4..08b43e22 100644 --- a/src/nwp_consumer/internal/services/archiver_service.py +++ b/src/nwp_consumer/internal/services/archiver_service.py @@ -118,7 +118,12 @@ def archive(self, year: int, month: int) -> ResultE[str]: "failed_times": ", ".join([t.strftime("Day %d %H:%M") for t in failed_times]), }) - if len(failed_times) == + if len(failed_times) == len(missing_times_result.unwrap()): + store.delete_store() + return Failure(OSError( + "Failed to write any regions for all init times. " + "Check error logs for details.", + )) # Postprocess the dataset as required # postprocess_result = store.postprocess(self._mr.metadata().postprocess_options)