bep40 commited on
Commit
1f89e89
·
verified ·
1 Parent(s): e12ee26

fix(links): visit-ping + keepalive trỏ VAIHOME

Browse files
Files changed (1) hide show
  1. entrypoint_vnews_sync.py +4 -4
entrypoint_vnews_sync.py CHANGED
@@ -73,7 +73,7 @@ def _sync_uploaded_image(image_url):
73
  def _lv_ping_visit():
74
  """Đếm 1 lượt truy cập Zalo bot → vai-avatar /api/stats/visit (fire-and-forget)."""
75
  try:
76
- requests.get("https://bep40-vai-avatar.hf.space/api/stats/visit?src=zalo", timeout=5)
77
  except Exception:
78
  pass
79
 
@@ -129,7 +129,7 @@ def _keepalive_vai_avatar():
129
  gated-ready) mất ~5 phút. Ping GET / mỗi 10 phút ở mức tối thiểu."""
130
  while True:
131
  try:
132
- requests.get("https://bep40-vai-avatar.hf.space/", timeout=6)
133
  except Exception:
134
  pass
135
  try:
@@ -279,7 +279,7 @@ def _lv_patch_visit(src):
279
  helper = (
280
  "def _lv_ping_visit():\n"
281
  " try:\n"
282
- " requests.get(\"https://bep40-vai-avatar.hf.space/api/stats/visit?src=zalo\", timeout=5)\n"
283
  " except Exception:\n"
284
  " pass\n\n"
285
  )
@@ -314,7 +314,7 @@ def _lv_patch_keepalive(src):
314
  "def _keepalive_vai_avatar():\n"
315
  " while True:\n"
316
  " try:\n"
317
- " requests.get(\"https://bep40-vai-avatar.hf.space/\", timeout=6)\n"
318
  " except Exception:\n"
319
  " pass\n"
320
  " try:\n"
 
73
  def _lv_ping_visit():
74
  """Đếm 1 lượt truy cập Zalo bot → vai-avatar /api/stats/visit (fire-and-forget)."""
75
  try:
76
+ requests.get("https://bep40-vaihome.hf.space/api/stats/visit?src=zalo", timeout=5)
77
  except Exception:
78
  pass
79
 
 
129
  gated-ready) mất ~5 phút. Ping GET / mỗi 10 phút ở mức tối thiểu."""
130
  while True:
131
  try:
132
+ requests.get("https://bep40-vaihome.hf.space/", timeout=6)
133
  except Exception:
134
  pass
135
  try:
 
279
  helper = (
280
  "def _lv_ping_visit():\n"
281
  " try:\n"
282
+ " requests.get(\"https://bep40-vaihome.hf.space/api/stats/visit?src=zalo\", timeout=5)\n"
283
  " except Exception:\n"
284
  " pass\n\n"
285
  )
 
314
  "def _keepalive_vai_avatar():\n"
315
  " while True:\n"
316
  " try:\n"
317
+ " requests.get(\"https://bep40-vaihome.hf.space/\", timeout=6)\n"
318
  " except Exception:\n"
319
  " pass\n"
320
  " try:\n"