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

🎉 Source Facebook Marketing: Increase pause interval time after reach MIN_RATE or MAX_RATE. #22990

Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class FacebookAPIException(Exception):
class MyFacebookAdsApi(FacebookAdsApi):
"""Custom Facebook API class to intercept all API calls and handle call rate limits"""

MAX_RATE, MAX_PAUSE_INTERVAL = (95, pendulum.duration(minutes=5))
MIN_RATE, MIN_PAUSE_INTERVAL = (90, pendulum.duration(minutes=1))
MAX_RATE, MAX_PAUSE_INTERVAL = (95, pendulum.duration(minutes=10))
MIN_RATE, MIN_PAUSE_INTERVAL = (85, pendulum.duration(minutes=2))

@dataclass
class Throttle:
Expand Down