Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
Signed-off-by: Praneeth Bedapudi <[email protected]>
  • Loading branch information
bedapudi6788 committed Nov 8, 2024
1 parent 801e789 commit fdcc741
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions fastdeploy/_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
):
Expand All @@ -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
):
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
EMAIL = "[email protected]"
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"]
Expand Down

0 comments on commit fdcc741

Please sign in to comment.