mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix(proxy/utils.py): fix retry logic for generic data request
This commit is contained in:
parent
e26b39822c
commit
acda064be6
1 changed files with 4 additions and 3 deletions
|
@ -679,8 +679,8 @@ class PrismaClient:
|
||||||
@backoff.on_exception(
|
@backoff.on_exception(
|
||||||
backoff.expo,
|
backoff.expo,
|
||||||
Exception, # base exception to catch for the backoff
|
Exception, # base exception to catch for the backoff
|
||||||
max_tries=3, # maximum number of retries
|
max_tries=1, # maximum number of retries
|
||||||
max_time=10, # maximum total time to retry for
|
max_time=2, # maximum total time to retry for
|
||||||
on_backoff=on_backoff, # specifying the function to call on backoff
|
on_backoff=on_backoff, # specifying the function to call on backoff
|
||||||
)
|
)
|
||||||
async def get_generic_data(
|
async def get_generic_data(
|
||||||
|
@ -718,7 +718,8 @@ class PrismaClient:
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
error_msg = f"LiteLLM Prisma Client Exception get_generic_data: {str(e)}"
|
error_msg = f"LiteLLM Prisma Client Exception get_generic_data: {str(e)}"
|
||||||
print_verbose(error_msg)
|
verbose_proxy_logger.error(error_msg)
|
||||||
|
error_msg = error_msg + "\nException Type: {}".format(type(e))
|
||||||
error_traceback = error_msg + "\n" + traceback.format_exc()
|
error_traceback = error_msg + "\n" + traceback.format_exc()
|
||||||
end_time = time.time()
|
end_time = time.time()
|
||||||
_duration = end_time - start_time
|
_duration = end_time - start_time
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue