mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-20 21:42:05 +08:00
uploader: azure returns 401 for files already uploaded (#24141)
This commit is contained in:
@@ -206,7 +206,7 @@ def upload_handler(end_event: threading.Event) -> None:
|
||||
cloudlog.event("athena.upload_handler.upload_start", fn=fn, sz=sz, network_type=network_type, metered=metered, retry_count=cur_upload_items[tid].retry_count)
|
||||
response = _do_upload(cur_upload_items[tid], cb)
|
||||
|
||||
if response.status_code not in (200, 201, 403, 412):
|
||||
if response.status_code not in (200, 201, 401, 403, 412):
|
||||
cloudlog.event("athena.upload_handler.retry", status_code=response.status_code, fn=fn, sz=sz, network_type=network_type, metered=metered)
|
||||
retry_upload(tid, end_event)
|
||||
else:
|
||||
|
||||
@@ -184,7 +184,7 @@ class Uploader():
|
||||
else:
|
||||
start_time = time.monotonic()
|
||||
stat = self.normal_upload(key, fn)
|
||||
if stat is not None and stat.status_code in (200, 201, 403, 412):
|
||||
if stat is not None and stat.status_code in (200, 201, 401, 403, 412):
|
||||
try:
|
||||
# tag file as uploaded
|
||||
setxattr(fn, UPLOAD_ATTR_NAME, UPLOAD_ATTR_VALUE)
|
||||
|
||||
Reference in New Issue
Block a user