Umm, maxlag _is_ used, in pywikibot/data/api.py, lines 159-160:
if "maxlag" not in self.params and config.maxlag: self.params["maxlag"] = [str(config.maxlag)]
Using the commandline argument -maxlag:0 will disable lagging.
Russ
----- Original Message ----- From: nicdumz@svn.wikimedia.org To: pywikipedia-svn@lists.wikimedia.org Sent: Thursday, September 17, 2009 9:39 AM Subject: [Pywikipedia-svn] SVN: [7261] branches/rewrite/pywikibot
Revision: 7261 Author: nicdumz Date: 2009-09-17 13:39:38 +0000 (Thu, 17 Sep 2009)
Log Message:
add config.no_lagging to disable lag for debugging purpose. (this should possibly be merged with maxlag which is currently not used)
Modified Paths:
branches/rewrite/pywikibot/config2.py branches/rewrite/pywikibot/data/api.py
Modified: branches/rewrite/pywikibot/config2.py
--- branches/rewrite/pywikibot/config2.py 2009-09-17 12:00:47 UTC (rev 7260) +++ branches/rewrite/pywikibot/config2.py 2009-09-17 13:39:38 UTC (rev 7261) @@ -346,6 +346,11 @@ # running solve_disambiguation.py with the -primary argument. special_page_limit = 500
+# Disable lagging, for debugging purposes. +# If your bot has this variable activated in a production environment, it is +# likely to be too aggressive and to get blocked by system admins. +no_lagging = False
############## TABLE CONVERSION BOT SETTINGS ##############
# will split long paragraphs for better reading the source.
Modified: branches/rewrite/pywikibot/data/api.py
--- branches/rewrite/pywikibot/data/api.py 2009-09-17 12:00:47 UTC (rev 7260) +++ branches/rewrite/pywikibot/data/api.py 2009-09-17 13:39:38 UTC (rev 7261) @@ -281,7 +281,7 @@ info = result["error"].pop("info", None) if code == "maxlag": lag = lagpattern.search(info)
if lag:
if lag and not config.no_lagging: pywikibot.output( u"Pausing due to database lag: " + info, level=pywikibot.VERBOSE)
Pywikipedia-svn mailing list Pywikipedia-svn@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn
2009/9/17 Russell Blau russblau@imapmail.org:
Umm, maxlag _is_ used, in pywikibot/data/api.py, lines 159-160:
if "maxlag" not in self.params and config.maxlag: self.params["maxlag"] = [str(config.maxlag)]
Using the commandline argument -maxlag:0 will disable lagging.
Russ
then I'm reverting this.
Thanks russ :)