Skip to content

Rate Limit only firing once #116

@zlever01

Description

@zlever01

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''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions