mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
update: write out cache as soon as possible
When working or testing with large APK collections, oftentimes it can take hours to scan all the APKs. If there is a failure before the apkcache is written out, then all that work is lost since no cache is written out. This moves the final cache writing before writing the index and knownapks to make it more likely that the apkcache is successfully written.
This commit is contained in:
parent
b5c8ecd3da
commit
0a1793ab7f
@ -2310,6 +2310,10 @@ def main():
|
|||||||
# This will be done again (as part of apply_info_from_latest_apk) for repo and archive
|
# This will be done again (as part of apply_info_from_latest_apk) for repo and archive
|
||||||
# separately later on, but it's fairly cheap anyway.
|
# separately later on, but it's fairly cheap anyway.
|
||||||
read_names_from_apks(apps, apks + archapks)
|
read_names_from_apks(apps, apks + archapks)
|
||||||
|
|
||||||
|
if cachechanged:
|
||||||
|
write_cache(apkcache)
|
||||||
|
|
||||||
# The added date currently comes from the oldest apk which might be in the archive.
|
# The added date currently comes from the oldest apk which might be in the archive.
|
||||||
# So we need this populated at app level before continuing with only processing /repo
|
# So we need this populated at app level before continuing with only processing /repo
|
||||||
# or /archive
|
# or /archive
|
||||||
@ -2349,9 +2353,6 @@ def main():
|
|||||||
# Update known apks info...
|
# Update known apks info...
|
||||||
knownapks.writeifchanged()
|
knownapks.writeifchanged()
|
||||||
|
|
||||||
if cachechanged:
|
|
||||||
write_cache(apkcache)
|
|
||||||
|
|
||||||
# Update the wiki...
|
# Update the wiki...
|
||||||
if options.wiki:
|
if options.wiki:
|
||||||
logging.warning(_('wiki support is deprecated and will be removed in the next release!'))
|
logging.warning(_('wiki support is deprecated and will be removed in the next release!'))
|
||||||
|
Loading…
Reference in New Issue
Block a user