Skip to content
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

Rate Limit only firing once #116

Open
zlever01 opened this issue Jul 21, 2023 · 0 comments
Open

Rate Limit only firing once #116

zlever01 opened this issue Jul 21, 2023 · 0 comments

Comments

@zlever01
Copy link

I have this code for rate limiting:


def ratelimit():
    print("Ratelimit Called")

api = bigcommerce.api.BigcommerceApi(client_id='xxxx', store_hash='xxxx,
                                     access_token='xxxx',
                                     rate_limiting_management={'min_requests_remaining': 3,
                                                               'wait': True,
                                                               'callback_function': ratelimit()})

for product in api.Products.iterall(): 
      
      ...

The rate limit function is only being fired once at the start of the program, and I'm getting this error:

bigcommerce.exception.RateLimitingException: 429 Too Many Requests @ products: b''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant