SeattleTestbed / softwareupdater

Software updater daemon
MIT License
1 stars 6 forks source link

software updater needs to sleep in potentially fast loops #10

Closed choksi81 closed 10 years ago

choksi81 commented 10 years ago

There are two cases in softwareupdater.py where there could potentially be extremely fast looping, either intentionally for small periods of time or unintentionally if an error occurred in just the wrong place. We should add a sleep in both of these cases to minimize the impact of the many loop repetitions.

The first case is in software_updater_start() where there is a loop that repeatedly checks for a file to be deleted.

The second case is in the try/except which wraps main(). If an exception happened early enough in main() and the exception was recurring, it could cause fast looping.

Adding small periods of sleep'ing is only to minimize the impact on clients in these cases. Were these situations to actually occur for an extended period of time, there would be a critical bug causing it.

choksi81 commented 10 years ago

Author: jsamuel Fixed in r2487.