Skip to content

Commit 69ba3cd

Browse files
committed
> fix expire
1 parent c275f61 commit 69ba3cd

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/sync-issue.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,18 @@ jobs:
4040
python parse_issue_body.py "${{ github.event.issue.body }}"
4141
shell: bash
4242

43-
- name: 执行同步脚本
43+
- name: 安装依赖
4444
if: ${{ steps.parse_body.outputs.sync_type == 'huggingface' }}
4545
run: |
4646
pip install -r requirements.txt
47+
env:
48+
QUNIU_ACCESS_TOKEN: ${{ secrets.QUNIU_ACCESS_TOKEN }}
49+
QUNIU_SECRET_KEY: ${{ secrets.QUNIU_SECRET_KEY }}
50+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
51+
52+
- name: 执行同步脚本
53+
if: ${{ steps.parse_body.outputs.sync_type == 'huggingface' }}
54+
run: |
4755
bash ./sync_hf.sh "${{ steps.parse_body.outputs.source_url }}" "${{ steps.parse_body.outputs.target_path }}"
4856
env:
4957
QUNIU_ACCESS_TOKEN: ${{ secrets.QUNIU_ACCESS_TOKEN }}

sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def upload_data(client, bucket_name, data, remote_file):
7777

7878

7979
def upload_stream(client, bucket_name, stream, remote_file, file_name, file_size):
80-
token = client.upload_token(bucket_name, remote_file, 3600)
80+
token = client.upload_token(bucket_name, remote_file, 36000)
8181
print(f"Uploading stream to {remote_file}")
8282
d, resp = put_stream_v2(token, remote_file, stream, file_name, file_size)
8383
if d is None:

0 commit comments

Comments
 (0)