Skip to content

Commit

Permalink
dont retry 401 for now
Browse files Browse the repository at this point in the history
  • Loading branch information
kkapper committed Apr 22, 2024
1 parent d7b1abe commit 6f40e63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plaidcloud/rpc/connection/jsonrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,9 @@ def __init__(self, *args, check_allow_transmit=None, **kwargs):
"""
kwargs.update(dict(

Check warning on line 142 in plaidcloud/rpc/connection/jsonrpc.py

View workflow job for this annotation

GitHub Actions / PyLint

[PyLint] plaidcloud/rpc/connection/jsonrpc.py#L142

R1735: Consider using '{"allowed_methods": ['POST'], "status_forcelist": [500, 502, 504]}' instead of a call to 'dict'. (use-dict-literal)
Raw output
plaidcloud/rpc/connection/jsonrpc.py:142:22: R1735: Consider using '{"allowed_methods": ['POST'], "status_forcelist": [500, 502, 504]}' instead of a call to 'dict'. (use-dict-literal)
allowed_methods=['POST'],
status_forcelist=[401, 500, 502, 504],
status_forcelist=[500, 502, 504],
backoff_factor=0.1,
))

if 'connect' not in kwargs:
kwargs['connect'] = 5
super(RPCRetry, self).__init__(*args, **kwargs)
Expand All @@ -161,6 +160,7 @@ def allow_transmit(self):
return True

def increment(self, *args, **kwargs):
print(f'Hit Retry, Request History Looks Like: {self.history}')
if not self.allow_transmit:
raise Exception('No more retries, RPC method has been cancelled')
return super(RPCRetry, self).increment(*args, **kwargs)
Expand Down

0 comments on commit 6f40e63

Please sign in to comment.