You've already forked my-video-workflow
减少无用内容输出,添加重试延迟,添加重试次数
This commit is contained in:
@ -221,8 +221,7 @@ def upload_chunk(upload_url, server_file_name, local_file_name, chunk_data, chun
|
||||
True: upload chunk success.
|
||||
False: upload chunk fail.
|
||||
"""
|
||||
print("chunk{}/{}".format(chunk_id, chunk_total_num))
|
||||
print("filename: {}".format(local_file_name))
|
||||
print("filename: {}".format(local_file_name), "chunk{}/{}".format(chunk_id, chunk_total_num))
|
||||
files = {
|
||||
'version': (None, '2.0.0.1054'),
|
||||
'filesize': (None, chunk_size),
|
||||
@ -239,12 +238,12 @@ def upload_chunk(upload_url, server_file_name, local_file_name, chunk_data, chun
|
||||
'PHPSESSID': server_file_name
|
||||
},
|
||||
)
|
||||
print(r.status_code)
|
||||
print(r.content)
|
||||
r.raise_for_status()
|
||||
if r.status_code == 200 and r.json().get("OK", 0) == 1:
|
||||
return True
|
||||
else:
|
||||
print(r.status_code)
|
||||
print(r.content)
|
||||
return False
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user