Skip to content

Commit

Permalink
fix(archiver): Error on no output
Browse files Browse the repository at this point in the history
  • Loading branch information
devsjc committed Dec 6, 2024
1 parent 585a74e commit 3f50001
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/nwp_consumer/internal/services/archiver_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3f50001

Please sign in to comment.