mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +03:00
wiki: log appids as checkupdates goes through them
This commit is contained in:
parent
fc4f5a79a7
commit
22c6acc026
1 changed files with 15 additions and 3 deletions
|
|
@ -543,8 +543,10 @@ def main():
|
||||||
|
|
||||||
apps = common.read_app_args(options.appid, allapps, False)
|
apps = common.read_app_args(options.appid, allapps, False)
|
||||||
|
|
||||||
|
gplaylog = ''
|
||||||
if options.gplay:
|
if options.gplay:
|
||||||
for appid, app in apps.items():
|
for appid, app in apps.items():
|
||||||
|
gplaylog += '* ' + appid + '\n'
|
||||||
version, reason = check_gplay(app)
|
version, reason = check_gplay(app)
|
||||||
if version is None:
|
if version is None:
|
||||||
if reason == '404':
|
if reason == '404':
|
||||||
|
|
@ -568,19 +570,23 @@ def main():
|
||||||
.format(common.getappname(app), version))
|
.format(common.getappname(app), version))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
locallog = ''
|
||||||
for appid, app in apps.items():
|
for appid, app in apps.items():
|
||||||
|
|
||||||
if options.autoonly and app.AutoUpdateMode in ('None', 'Static'):
|
if options.autoonly and app.AutoUpdateMode in ('None', 'Static'):
|
||||||
logging.debug(_("Nothing to do for {appid}.").format(appid=appid))
|
logging.debug(_("Nothing to do for {appid}.").format(appid=appid))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
logging.info(_("Processing {appid}").format(appid=appid))
|
msg = _("Processing {appid}").format(appid=appid)
|
||||||
|
logging.info(msg)
|
||||||
|
locallog += '* ' + msg + '\n'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
checkupdates_app(app)
|
checkupdates_app(app)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(_("...checkupdate failed for {appid} : {error}")
|
msg = _("...checkupdate failed for {appid} : {error}").format(appid=appid, error=e)
|
||||||
.format(appid=appid, error=e))
|
logging.error(msg)
|
||||||
|
locallog += msg + '\n'
|
||||||
|
|
||||||
if config.get('wiki_server') and config.get('wiki_path'):
|
if config.get('wiki_server') and config.get('wiki_path'):
|
||||||
try:
|
try:
|
||||||
|
|
@ -597,6 +603,12 @@ def main():
|
||||||
txt += "* started at " + common.get_wiki_timestamp(start_timestamp) + '\n'
|
txt += "* started at " + common.get_wiki_timestamp(start_timestamp) + '\n'
|
||||||
txt += "* completed at " + common.get_wiki_timestamp() + '\n'
|
txt += "* completed at " + common.get_wiki_timestamp() + '\n'
|
||||||
txt += "\n\n"
|
txt += "\n\n"
|
||||||
|
if gplaylog:
|
||||||
|
txt += '== --gplay check ==\n\n'
|
||||||
|
txt += gplaylog
|
||||||
|
if locallog:
|
||||||
|
txt += '== local source check ==\n\n'
|
||||||
|
txt += locallog
|
||||||
newpage.save(txt, summary='Run log')
|
newpage.save(txt, summary='Run log')
|
||||||
newpage = site.Pages['checkupdates']
|
newpage = site.Pages['checkupdates']
|
||||||
newpage.save('#REDIRECT [[' + wiki_page_path + ']]', summary='Update redirect')
|
newpage.save('#REDIRECT [[' + wiki_page_path + ']]', summary='Update redirect')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue