mirror of
https://github.com/clearml/clearml
synced 2025-01-31 17:17:00 +00:00
Fix delete_after_upload when wait_for_upload=True was not supported
This commit is contained in:
parent
b656e0115f
commit
0e0b03157f
@ -715,6 +715,11 @@ class Artifacts(object):
|
|||||||
# noinspection PyProtectedMember
|
# noinspection PyProtectedMember
|
||||||
if wait_on_upload:
|
if wait_on_upload:
|
||||||
StorageManager.upload_file(local_file, uri)
|
StorageManager.upload_file(local_file, uri)
|
||||||
|
if delete_after_upload:
|
||||||
|
try:
|
||||||
|
os.unlink(local_file)
|
||||||
|
except OSError:
|
||||||
|
LoggerRoot.get_base_logger().warning('Failed removing temporary {}'.format(local_file))
|
||||||
else:
|
else:
|
||||||
self._task._reporter._report(ev)
|
self._task._reporter._report(ev)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user