diff --git a/automon/integrations/facebook/groups.py b/automon/integrations/facebook/groups.py index ad4dcbcb..fb621ac3 100644 --- a/automon/integrations/facebook/groups.py +++ b/automon/integrations/facebook/groups.py @@ -472,20 +472,23 @@ def get_with_rate_limiter( result = None while retry < retries: - if not self.rate_limited(): - - result = self.get(url=url) - - if self.rate_limited(): - self.rate_limit_increase() - result = False - self._rate_counter.append(self._wait_between_retries) - Sleeper.seconds(seconds=self._wait_between_retries) - else: - log.info(f'{result}') - self.rate_limit_decrease() - self.screenshot_success() - return result + if self.rate_limited(): + self.rate_limit_increase() + + self._rate_counter.append(self._wait_between_retries) + Sleeper.seconds(seconds=self._wait_between_retries) + log.error(str(dict( + url=url, + retry=retry, + retries=retries, + ))) + continue + + result = self.get(url=url) + log.info(f'{result}') + self.rate_limit_decrease() + self.screenshot_success() + return result retry = retry + 1