Last modified: 2014-08-01 04:08:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70986, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68986 - high lag during log initialisation
high lag during log initialisation
Status: NEW
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-01 04:08 UTC by John Mark Vandenberg
Modified: 2014-08-01 04:08 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description John Mark Vandenberg 2014-08-01 04:08:11 UTC
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)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links