mirror of
https://github.com/munki/munki.git
synced 2026-01-26 17:09:30 -06:00
App Engine Blobstore does not send Content-Type, which means targetsize is always 0 and therefore the conditional that calculates and reports download progress is never entered, and the existing sleep location is never hit. On slow internet connections, this means that CPU spikes as proc.poll() is being called far more than curl is downloading. Fix this by moving time.sleep(0.1) into the main curl while loop, where it'll execute on every loop iteration. That means we have a small sleep even while headers are downloading/etc, but that's not a big deal given it's a 1/10th of a second.