https://bugzilla.wikimedia.org/show_bug.cgi?id=68986
Bug ID: 68986
Summary: high lag during log initialisation
Product: Pywikibot
Version: core (2.0)
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General
Assignee: Pywikipedia-bugs(a)lists.wikimedia.org
Reporter: jayvdb(a)gmail.com
Web browser: ---
Mobile Platform: ---
If initialisation is going to be slowed down due to server lag, the user should
be informed.
$ python pwb.py featured
Sleeping for 120.0 seconds, 2014-08-01 11:02:01
^CTraceback (most recent call last):
File "pwb.py", line 143, in <module>
run_python_file(fn, argv, argvu)
File "pwb.py", line 67, in run_python_file
exec(compile(source, filename, "exec"), main_mod.__dict__)
File "scripts/featured.py", line 622, in <module>
main()
File "scripts/featured.py", line 603, in main
for arg in pywikibot.handleArgs():
File ".../pywikibot/bot.py", line 648, in handleArgs
init_handlers()
File ".../pywikibot/bot.py", line 242, in init_handlers
writelogheader()
File ".../pywikibot/bot.py", line 274, in writelogheader
log(u'SITE VERSION: %s' % unicode(site.live_version()))
File ".../pywikibot/site.py", line 1278, in live_version
versionstring = self.siteinfo['generator']
File ".../pywikibot/site.py", line 1184, in siteinfo
self._getsiteinfo()
File ".../pywikibot/site.py", line 1116, in _getsiteinfo
sidata = sirequest.submit()
File ".../pywikibot/data/api.py", line 505, in submit
self._data = super(CachedRequest, self).submit()
File ".../pywikibot/data/api.py", line 405, in submit
self.site.throttle.lag(int(lag.group("lag")))
File ".../pywikibot/throttle.py", line 310, in lag
time.sleep(wait)
KeyboardInterrupt
<type 'exceptions.KeyboardInterrupt'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
Ideally, server version should be fetched and logged asynchronously.
This is similar to the repo log version, for which was added a config var to
bypass. (log_pywiki_repo_version = False)
--
You are receiving this mail because:
You are the assignee for the bug.