We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We're using Facebook Marketing API and we'd like to backoff when we iterate over cursor. Cursor actually fetches pages from API.
@backoff.on_exception(backoff.expo, FacebookRequestError, max_tries=8, max_value=300) def fetch_ad_sets(my_account, fields, params): return my_account.get_ad_sets( fields=fields, params=params ) adsets_cursor: Cursor = fetch_ad_sets(my_account, fields, params) # may throw an exception for ad_set_record in adsets_cursor: # do work
Is there any way to handle this with backoff ?
The text was updated successfully, but these errors were encountered:
I think you can simply wrap it with a function which is decorated with the proper exception, for example:
@backoff.on_exception(backoff.expo, FacebookRequestError, max_tries=8, max_value=300) def fetch_ad_sets_wrapper(my_account, fields, params): return fetch_ad_sets(my_account, fields, params)
Sorry, something went wrong.
No branches or pull requests
We're using Facebook Marketing API and we'd like to backoff when we iterate over cursor. Cursor actually fetches pages from API.
Is there any way to handle this with backoff ?
The text was updated successfully, but these errors were encountered: