ci增加重传机制 (#410)
This commit is contained in:
parent
e9428d5757
commit
9c986d06cb
4
.github/sync.py
vendored
4
.github/sync.py
vendored
@ -97,6 +97,9 @@ def sync_to_gitee(tag: str, body: str, files: slice):
|
|||||||
asset_api_uri = f"{release_api_uri}/{release_id}/attach_files"
|
asset_api_uri = f"{release_api_uri}/{release_id}/attach_files"
|
||||||
|
|
||||||
for file_path in files:
|
for file_path in files:
|
||||||
|
success = False
|
||||||
|
|
||||||
|
while not success:
|
||||||
files = {
|
files = {
|
||||||
'file': open(file_path, 'rb')
|
'file': open(file_path, 'rb')
|
||||||
}
|
}
|
||||||
@ -108,6 +111,7 @@ def sync_to_gitee(tag: str, body: str, files: slice):
|
|||||||
asset_info = asset_api_response.json()
|
asset_info = asset_api_response.json()
|
||||||
asset_name = asset_info.get('name')
|
asset_name = asset_info.get('name')
|
||||||
print(f"Successfully uploaded {asset_name}!")
|
print(f"Successfully uploaded {asset_name}!")
|
||||||
|
success = True
|
||||||
else:
|
else:
|
||||||
print(
|
print(
|
||||||
f"Request failed with status code {asset_api_response.status_code}")
|
f"Request failed with status code {asset_api_response.status_code}")
|
||||||
|
Loading…
Reference in New Issue
Block a user