Disable progress upload callback at the end of http driver upload until we have full upload progress

This commit is contained in:
allegroai 2021-02-27 23:52:14 +02:00
parent 7e6158dd9b
commit a2557c253c

View File

@ -1031,11 +1031,13 @@ class _HttpDriver(_Driver):
if res.status_code != requests.codes.ok: if res.status_code != requests.codes.ok:
raise ValueError('Failed uploading object %s (%d): %s' % (object_name, res.status_code, res.text)) raise ValueError('Failed uploading object %s (%d): %s' % (object_name, res.status_code, res.text))
if callback and stream_size: # call back is useless because we are not calling it while uploading...
try:
callback(stream_size) # if callback and stream_size:
except Exception as ex: # try:
log.debug('Exception raised when running callback function: %s' % ex) # callback(stream_size)
# except Exception as ex:
# log.debug('Exception raised when running callback function: %s' % ex)
return res return res
def list_container_objects(self, *args, **kwargs): def list_container_objects(self, *args, **kwargs):