log errors when project download fails (refs #156)#184
log errors when project download fails (refs #156)#184
Conversation
wonder-sk
left a comment
There was a problem hiding this comment.
If you try to disable your networking while download job is running, will it store the error properly?
|
|
||
| except ClientError: | ||
| except ClientError as e: | ||
| mp.log.error("Error while downloading project: " + str(e)) |
There was a problem hiding this comment.
| mp.log.error("Error while downloading project: " + str(e)) | |
| mp.log.error("Error while querying project info: " + str(e)) |
| """ | ||
| for future in job.futures: | ||
| if future.done() and future.exception() is not None: | ||
| job.mp.log.error("Error while downloading project: " + str(future.exception())) |
There was a problem hiding this comment.
It would be good to produce more details here - including traceback, because it could be arbitrary exception...
| for future in job.futures: | ||
| if future.done() and future.exception() is not None: | ||
| job.mp.log.error("Error while downloading project: " + str(future.exception())) | ||
| job.mp.log.info("--- download aborted") |
There was a problem hiding this comment.
I am thinking that as the handling of failed futures is the same in _is_running() and in _finalize() methods, maybe it would be good to move it to a new function to avoid code duplication? So here the _is_running() body would become just this:
- _abort_download_on_failed_future()
- test for future.running()
|
could you please also add a check in |
|
Closed, as we decided to merge this with #182. |
Save exception details to the log when download fails.
Refs #156.