diff --git a/earwigbot/wiki/category.py b/earwigbot/wiki/category.py index 5158ef6..b65e367 100644 --- a/earwigbot/wiki/category.py +++ b/earwigbot/wiki/category.py @@ -126,7 +126,7 @@ class Category(Page): self.site.SERVICE_API: self._get_size_via_api, self.site.SERVICE_SQL: self._get_size_via_sql } - return self.site.delegate(services, (self, member_type,)) + return self.site.delegate(services, (member_type)) @property def size(self): @@ -202,4 +202,4 @@ class Category(Page): } if follow_redirects is None: follow_redirects = self._follow_redirects - return self.site.delegate(services, (self, follow_redirects,)) + return self.site.delegate(services, (limit, follow_redirects)) diff --git a/earwigbot/wiki/site.py b/earwigbot/wiki/site.py index 28508dd..a95f7cc 100644 --- a/earwigbot/wiki/site.py +++ b/earwigbot/wiki/site.py @@ -555,6 +555,7 @@ class Site(object): else: if not self._sql_info_cache["usable"]: return [self.SERVICE_API] + sqllag = self._sql_info_cache["replag"] if sqllag > 180: if not self._maxlag: @@ -565,6 +566,8 @@ class Site(object): self._api_info_cache["maxlag"] = apilag = self.get_maxlag() except exceptions.APIError: self._api_info_cache["maxlag"] = apilag = 0 + else: + apilag = self._api_info_cache["maxlag"] if sqllag / (180.0 / self._maxlag) < apilag: return [self.SERVICE_SQL, self.SERVICE_API] return [self.SERVICE_API, self.SERVICE_SQL]