Skip to content

Commit

Permalink
chore: increase backoff factor
Browse files Browse the repository at this point in the history
  • Loading branch information
am6010 committed Sep 20, 2023
1 parent 5960b52 commit cefd96a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class FacebookAPIException(Exception):
"""General class for all API errors"""


backoff_policy = retry_pattern(backoff.expo, FacebookRequestError, max_tries=5, factor=5)
backoff_policy = retry_pattern(backoff.expo, FacebookRequestError, max_tries=5, factor=10)


class MyFacebookAdsApi(FacebookAdsApi):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class Ads(FBMarketingIncrementalStream):
"""doc: https://developers.facebook.com/docs/marketing-api/reference/adgroup"""

entity_prefix = "ad"
use_batch = False

def list_objects(self, params: Mapping[str, Any]) -> Iterable:
return self._api.account.get_ads(params=params)
Expand All @@ -101,6 +102,7 @@ class AdSets(FBMarketingIncrementalStream):
"""doc: https://developers.facebook.com/docs/marketing-api/reference/ad-campaign"""

entity_prefix = "adset"
use_batch = False

def list_objects(self, params: Mapping[str, Any]) -> Iterable:
return self._api.account.get_ad_sets(params=params)
Expand Down

0 comments on commit cefd96a

Please sign in to comment.