Skip to content

Commit 4bf7b76

Browse files
Mike ProsserMike Prosser
authored andcommitted
don't rate limit on the client side
1 parent 478c997 commit 4bf7b76

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/nipanel/_panel_client.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import logging
66
import threading
7-
import time
87
from typing import Callable, TypeVar
98

109
import grpc
@@ -159,9 +158,7 @@ def _invoke_with_retry(
159158
) -> _T:
160159
"""Invoke a gRPC method with retry logic."""
161160
try:
162-
retval = method(*args, **kwargs)
163-
time.sleep(0.001) # limit gRPC call rate to avoid overwhelming the server
164-
return retval
161+
return method(*args, **kwargs)
165162
except grpc.RpcError as e:
166163
if e.code() == grpc.StatusCode.UNAVAILABLE or e.code() == grpc.StatusCode.UNKNOWN:
167164
# if the service is unavailable, we can retry the connection

0 commit comments

Comments
 (0)