From 7bc387f309d4cf65de144b02c994d2da53cf3734 Mon Sep 17 00:00:00 2001 From: devsjc <47188100+devsjc@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:24:27 +0000 Subject: [PATCH] fix(service): Better paths --- src/nwp_consumer/internal/services/archiver_service.py | 2 +- src/nwp_consumer/internal/services/consumer_service.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nwp_consumer/internal/services/archiver_service.py b/src/nwp_consumer/internal/services/archiver_service.py index 2edf08b5..7b8be59d 100644 --- a/src/nwp_consumer/internal/services/archiver_service.py +++ b/src/nwp_consumer/internal/services/archiver_service.py @@ -120,7 +120,7 @@ def archive(self, year: int, month: int) -> ResultE[pathlib.Path]: monitor.join() notify_result = self.nr().notify( message=entities.StoreCreatedNotification( - filename=store.path.name, + filename=pathlib.Path(store.path).name, size_mb=store.size_kb // 1024, performance=entities.PerformanceMetadata( duration_seconds=monitor.get_runtime(), diff --git a/src/nwp_consumer/internal/services/consumer_service.py b/src/nwp_consumer/internal/services/consumer_service.py index d72179df..29aaca4f 100644 --- a/src/nwp_consumer/internal/services/consumer_service.py +++ b/src/nwp_consumer/internal/services/consumer_service.py @@ -124,7 +124,7 @@ def consume(self, it: dt.datetime | None = None) -> ResultE[pathlib.Path]: monitor.join() notify_result = self.nr().notify( message=entities.StoreCreatedNotification( - filename=store.path.name, + filename=pathlib.Path(store.path).name, size_mb=store.size_kb // 1024, performance=entities.PerformanceMetadata( duration_seconds=monitor.get_runtime(),