-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amount of retries configurable #10
Amount of retries configurable #10
Conversation
57e4edf
to
b4bb87b
Compare
@lullis if you can kindly review it |
2e5cf3b
to
3d2f9ff
Compare
@@ -20,6 +21,12 @@ class ShipBobClient(Session): | |||
|
|||
ACCESS_TOKEN = os.getenv("SHIPBOB_ACCESS_TOKEN") | |||
|
|||
MAX_RETRIES_AFTER_RATE_LIMIT: int = os.getenv("SHIPBOB_MAX_RETRIES_AFTER_RATE_LIMIT") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having a limit of amount of times to retry, wouldn't it be better/easier to track the amount of time since the last successful request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lullis it is being handled this is maximum number of retries to perform and I am mainting the separate counter RETRIES_AFTER_RATE_LIMIT to count number of time since last successful request
@lullis if you can review this PR |
@lullis do let me if I need to change anything more |
59d6d01
to
0f75736
Compare
3af8b5b
to
1d4e2ec
Compare
Signed-off-by: Shaharyar Shamshi <shaharyarshamshi@gmail.com>
1d4e2ec
to
207d813
Compare
@lullis do I need to update anything |
97e82ec
to
f3aac5d
Compare
Fixes #7