This commit is contained in:
2026-11-04 15:35:15 +08:00
parent 4709ea4328
commit 62291c57ec
12 changed files with 363 additions and 72 deletions
+3 -1
View File
@@ -2,6 +2,7 @@
import asyncio
import logging
import time
from api.utils import official_gold, thirdpart_gold
@@ -27,7 +28,8 @@ async def _periodic(job):
await job()
except Exception:
logger.exception('periodic gold refresh check failed job=%s', job.__name__)
await asyncio.sleep(CHECK_INTERVAL_SECONDS)
# 对齐墙钟分钟边界,:25/:55检测到下一半小时数据周期并提前采集。
await asyncio.sleep(CHECK_INTERVAL_SECONDS - time.time() % CHECK_INTERVAL_SECONDS)
async def start_periodic_refresh():