Skip to content

Commit

Permalink
build: 调整endpoint同步时间
Browse files Browse the repository at this point in the history
  • Loading branch information
weaigc committed Sep 12, 2023
1 parent d58d173 commit a5c24cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sync-endpoint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Sync Endpoint
on:
schedule:
- cron: '0 22 * * *'
- cron: '* */24 * * *'

jobs:
sync-to-hub:
Expand Down
5 changes: 4 additions & 1 deletion sync/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
with open(file,"r") as f:
content=f.read().strip()
print('content:', content)
endpointIndex = '1' if content == '0' else '0'
index = int(content) + 1
if index >= len(endpoints):
index = 0
endpointIndex = str(index)
f.close()
except IOError:
print("File not accessible")
Expand Down

0 comments on commit a5c24cc

Please sign in to comment.