Asset fetcher improvements
Use the avocado.utils.filelock to avoid race conditions: - Download the files with a temporary unique name. - Lock the original file. - Move downloaded file to the original name. - Compute the hash, creating the hashfile. - Verify the file against the provided hash. - Unlock the original file. (While the lock is acquired, users trying to use the file will wait until the lock is released or, on wait timeout, receive a cache miss) Drop EnviromentError exceptions on cache miss. Instead, we now only log an error message and return None. Clean debug messages. Log was being polluted by asset fetcher. Let's make it quieter. Reference: https://trello.com/c/NeFPMkZY Reference: https://trello.com/c/OWCprQpdSigned-off-by: NAmador Pahim <apahim@redhat.com>
Showing
想要评论请 注册 或 登录