Skip to content

Commit

Permalink
chore: increase pause value to 4 min and the max sleep time to 3 hours
Browse files Browse the repository at this point in the history
  • Loading branch information
am6010 committed Feb 6, 2025
1 parent 888200a commit 4272348
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ 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=10))
MIN_RATE, MIN_PAUSE_INTERVAL = (85, pendulum.duration(minutes=2))
MAX_SLEEP_TIME_FOR_RATE_LIMIT = 3600 # 1 hour
MIN_RATE, MIN_PAUSE_INTERVAL = (85, pendulum.duration(minutes=4))
MAX_SLEEP_TIME_FOR_RATE_LIMIT = 3600 * 3 # 1 hour
current_sleep_time = 0
SLEEP_TIME_EXCEEDED_MESSAGE = "Exceeded maximum sleep time waiting for rate limit to reset"

Expand Down

0 comments on commit 4272348

Please sign in to comment.