From fdcc7414a0c1216cf66fab77604e34263dd4a0a3 Mon Sep 17 00:00:00 2001 From: Praneeth Bedapudi Date: Fri, 8 Nov 2024 11:26:01 +0530 Subject: [PATCH] minor changes Signed-off-by: Praneeth Bedapudi --- fastdeploy/_rest.py | 12 +++++++++--- setup.py | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/fastdeploy/_rest.py b/fastdeploy/_rest.py index 892723a..c03dbc4 100644 --- a/fastdeploy/_rest.py +++ b/fastdeploy/_rest.py @@ -54,6 +54,12 @@ def register_request_and_wait_for_response( return self.infer.get_timeout_response( unique_id, is_compressed, input_type, is_client_timeout=True ) + except Exception as e: + _utils.logger.exception(e, exc_info=True) + _utils.logger.error(f"Error registering request and waiting for response: {e}") + return self.infer.get_timeout_response( + unique_id, is_compressed, input_type, is_client_timeout=True + ) finally: with self.lock: self.pending_requests.pop(unique_id, None) @@ -388,7 +394,7 @@ def on_get(self, req, resp): } return - elif fail_if_requests_older_than_x_seconds_pending_param: + if fail_if_requests_older_than_x_seconds_pending_param: if _utils.check_if_requests_older_than_x_seconds_pending( int(fail_if_requests_older_than_x_seconds_pending_param) ): @@ -398,7 +404,7 @@ def on_get(self, req, resp): } return - elif fail_if_up_time_more_than_x_seconds_param: + if fail_if_up_time_more_than_x_seconds_param: if time.time() - Infer.started_at_time > int( fail_if_up_time_more_than_x_seconds_param ): @@ -408,7 +414,7 @@ def on_get(self, req, resp): } return - elif fail_if_requests_timedout_in_last_x_seconds_is_more_than_y_param: + if fail_if_requests_timedout_in_last_x_seconds_is_more_than_y_param: ( x, y, diff --git a/setup.py b/setup.py index c346e53..b1d4ad2 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ EMAIL = "praneeth@bpraneeth.com" AUTHOR = "BEDAPUDI PRANEETH" REQUIRES_PYTHON = ">=3.6.0" -VERSION = "3.0.32" +VERSION = "3.1.0" # What packages are required for this module to be executed? REQUIRED = ["falcon", "liteindex==0.0.3.2.dev6", "zstandard", "gunicorn[gevent]", "msgpack"]