alesamodio commited on
Commit
cdf6be8
·
1 Parent(s): 9595689

update link with db3 update

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -37,8 +37,9 @@ def trigger_db3():
37
  for attempt in range(1, 41): # ≈ 20 min total (30 s × 40)
38
  try:
39
  # 1️⃣ check if Db3_update responds
40
- r = requests.get(DB3_URL, timeout=15)
41
- if r.status_code == 200 and '"status"' in r.text:
 
42
  log.append(f"✅ Attempt {attempt}: space ready, calling /run")
43
  run_url = f"{DB3_URL}/run?secret={SECRET}"
44
  run_resp = requests.get(run_url, timeout=120)
 
37
  for attempt in range(1, 41): # ≈ 20 min total (30 s × 40)
38
  try:
39
  # 1️⃣ check if Db3_update responds
40
+ READY_URL = f"{DB3_URL}/ready"
41
+ r = requests.get(READY_URL, timeout=15)
42
+ if r.status_code == 200 and '"ready"' in r.text:
43
  log.append(f"✅ Attempt {attempt}: space ready, calling /run")
44
  run_url = f"{DB3_URL}/run?secret={SECRET}"
45
  run_resp = requests.get(run_url, timeout=120)