Revision: 7664 Author: xqt Date: 2009-11-17 09:58:20 +0000 (Tue, 17 Nov 2009)
Log Message: ----------- I got a dbrepllag of 10 hours (!?)
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2009-11-16 22:12:39 UTC (rev 7663) +++ trunk/pywikipedia/wikipedia.py 2009-11-17 09:58:20 UTC (rev 7664) @@ -1723,9 +1723,9 @@ # server lag; wait for the lag time and retry m = re.search('Waiting for (.+?): (.+?) seconds lagged', data['error']['info']) timelag = int(m.group(2)) - output(u"Pausing %d seconds due to database server lag." % timelag) + output(u"Pausing %d seconds due to database server lag." % min(timelag,300)) dblagged = True - time.sleep(timelag) + time.sleep(min(timelag,300)) continue elif errorCode == 'editconflict': # 'editconflict':"Edit conflict detected",
pywikipedia-svn@lists.wikimedia.org