fedora-infra / mirrormanager2

Rewrite of the MirrorManager application in Flask and SQLAlchemy
https://mirrormanager.fedoraproject.org
GNU General Public License v2.0
63 stars 46 forks source link

Only query database once for mirrorlist export #273

Closed adrianreber closed 4 years ago

adrianreber commented 4 years ago

If the mirrorlist data exporter is writing pkl and protobuf files at the same time some database queries are running twice, which can take a lot of time. This change moves all database queries in the populate_all_caches() function which is the correct place. Previously some queries were run in populate_all_caches() and some in dump_ccaches().

This commit also includes a single line change to mm2_update-mirrorlist-server to forward all parameters to the actual data exporter script.