Skip to content

Commit

Permalink
Refer to blob storage in inspection result message
Browse files Browse the repository at this point in the history
when sending over MQTT

Co-authored-by: Mariana R. Santos <mrica@equinor.com>
  • Loading branch information
tsundvoll and mrica-equinor committed Mar 13, 2024
1 parent bd78423 commit 25e90b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/isar/storage/blob_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _upload_file(self, path: Path, data: bytes) -> str:
except Exception as e:
self.logger.error("An unexpected error occurred while uploading blob")
raise StorageException from e
return blob_properties["etag"]
return blob_client.blob_name

def _get_blob_service_client(self) -> BlobServiceClient:
try:
Expand Down
3 changes: 2 additions & 1 deletion src/isar/storage/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@ def get_filename(


def get_foldername(mission: Mission) -> str:
return f"{datetime.utcnow().date()}__{settings.PLANT_SHORT_NAME}__{mission.name}__{mission.id}"
mission_name: str = mission.name.replace(" ", "-")
return f"{datetime.utcnow().date()}__{settings.PLANT_SHORT_NAME}__{mission_name}__{mission.id}"

0 comments on commit 25e90b2

Please sign in to comment.