Skip to content

Commit a5c24cc

Browse files
committed
build: 调整endpoint同步时间
1 parent d58d173 commit a5c24cc

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/sync-endpoint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Sync Endpoint
22
on:
33
schedule:
4-
- cron: '0 22 * * *'
4+
- cron: '* */24 * * *'
55

66
jobs:
77
sync-to-hub:

sync/sync.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
with open(file,"r") as f:
1414
content=f.read().strip()
1515
print('content:', content)
16-
endpointIndex = '1' if content == '0' else '0'
16+
index = int(content) + 1
17+
if index >= len(endpoints):
18+
index = 0
19+
endpointIndex = str(index)
1720
f.close()
1821
except IOError:
1922
print("File not accessible")

0 commit comments

Comments
 (0)