From df7c23defe94e5009cdea4b93bdb0681d39c8da3 Mon Sep 17 00:00:00 2001 From: Nick Date: Sat, 15 Jun 2024 23:56:16 +0300 Subject: [PATCH] Update blob.py --- moai/serve/handlers/azure/blob.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/moai/serve/handlers/azure/blob.py b/moai/serve/handlers/azure/blob.py index 63a70d2..8e99178 100644 --- a/moai/serve/handlers/azure/blob.py +++ b/moai/serve/handlers/azure/blob.py @@ -47,10 +47,9 @@ def __call__( ) -> typing.Any: if self.json_key not in json: - log.error(f"json key: {self.json_key}, not found in json request") + log.error(f"json key: {self.json_key}, not found in json request") working_dir = json[self.json_key] - # initialize connection to Azure Blob Storage connect_str = json[self.connection_string] try: @@ -103,7 +102,7 @@ def __init__( # self.blob_service_client = BlobServiceClient.from_connection_string( # connection_string, # ) - + self.connection_string = connection_string self.container_name = container_name self.blob_paths = blob_paths @@ -122,9 +121,9 @@ def __call__( # NOTE: void is the input json response # TODO: need to check batched inference input_json = void[0].get("body") or void[0].get("raw") - + if self.json_key not in input_json: - log.error(f"json key: {self.json_key}, not found in json request") + log.error(f"json key: {self.json_key}, not found in json request") working_dir = input_json[self.json_key] # initialize connection to Azure Blob Storage