@@ -55,8 +55,7 @@ class AFCSubmissions(Command): | |||||
site = self.bot.wiki.get_site() | site = self.bot.wiki.get_site() | ||||
category = site.get_category("Pending AfC submissions") | category = site.get_category("Pending AfC submissions") | ||||
limit = number + len(self.ignore_list) | |||||
members = category.get_members(use_sql=True, limit=limit) | |||||
members = category.get_members(limit=number + len(self.ignore_list)) | |||||
urls = [member.url for member in members if member.title not in self.ignore_list] | urls = [member.url for member in members if member.title not in self.ignore_list] | ||||
pages = ", ".join(urls[:number]) | pages = ", ".join(urls[:number]) | ||||
self.reply(data, "{0} pending AfC subs: {1}".format(number, pages)) | self.reply(data, "{0} pending AfC subs: {1}".format(number, pages)) |
@@ -130,7 +130,7 @@ class AFCHistory(Task): | |||||
q_delete = "DELETE FROM page WHERE page_id = ?" | q_delete = "DELETE FROM page WHERE page_id = ?" | ||||
q_update = "UPDATE page SET page_date = ?, page_status = ? WHERE page_id = ?" | q_update = "UPDATE page SET page_date = ?, page_status = ? WHERE page_id = ?" | ||||
q_insert = "INSERT INTO page VALUES (?, ?, ?)" | q_insert = "INSERT INTO page VALUES (?, ?, ?)" | ||||
members = category.get_members(use_sql=True) | |||||
members = category.get_members() | |||||
with self.conn.cursor() as cursor: | with self.conn.cursor() as cursor: | ||||
for title, pageid in members: | for title, pageid in members: | ||||
@@ -271,9 +271,7 @@ class AFCStatistics(Task): | |||||
tracked = [i[0] for i in cursor.fetchall()] | tracked = [i[0] for i in cursor.fetchall()] | ||||
category = self.site.get_category(self.pending_cat) | category = self.site.get_category(self.pending_cat) | ||||
pending = category.get_members(use_sql=True) | |||||
for title, pageid in pending: | |||||
for title, pageid in category.get_members(): | |||||
if title in self.ignore_list: | if title in self.ignore_list: | ||||
continue | continue | ||||
if pageid not in tracked: | if pageid not in tracked: | ||||
@@ -476,7 +476,7 @@ class Page(CopyrightMixIn): | |||||
Makes an API query only if we haven't already made one and the *pageid* | Makes an API query only if we haven't already made one and the *pageid* | ||||
parameter to :py:meth:`__init__` was left as ``None``, which should be | parameter to :py:meth:`__init__` was left as ``None``, which should be | ||||
true for all cases except when pages are returned by an SQL generator | true for all cases except when pages are returned by an SQL generator | ||||
(like :py:meth:`category.get_members(use_sql=True) | |||||
(like :py:meth:`category.get_members() | |||||
<earwigbot.wiki.category.Category.get_members>`). | <earwigbot.wiki.category.Category.get_members>`). | ||||
Raises :py:exc:`~earwigbot.exceptions.InvalidPageError` or | Raises :py:exc:`~earwigbot.exceptions.InvalidPageError` or | ||||