jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1325867?usp=email )

Change subject: archivebot: Avoid retaining preloaded pages
......................................................................

archivebot: Avoid retaining preloaded pages

Exhaust the preload generator directly because only its side effects are needed.

Avoid building a temporary list as the archive counter grows.

Change-Id: I994e9dfcc6ed02d97d723c9d9c8b00afb67deaeb
---
M scripts/archivebot.py
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Xqt: Looks good to me, approved




diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index dcec6f3..350a1dd 100755
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -788,7 +788,8 @@
         for c in range(counter):
             params = self.get_params(thread.timestamp, c + 1)
             self.get_archive_page(pattern % params, params)
-        list(self.site.preloadpages(self.archives.values()))
+        for _ in self.site.preloadpages(self.archives.values()):
+            pass

     def analyze_page(self) -> set[tuple[str, str]]:
         """Analyze DiscussionPage."""

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1325867?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I994e9dfcc6ed02d97d723c9d9c8b00afb67deaeb
Gerrit-Change-Number: 1325867
Gerrit-PatchSet: 2
Gerrit-Owner: Mahveotm <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to