[Pywikipedia-svn] SVN: [7261] branches/rewrite/pywikibot
nicdumz at svn.wikimedia.org
nicdumz at svn.wikimedia.org
Thu Sep 17 13:39:38 UTC 2009
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)
More information about the Pywikipedia-svn
mailing list