...
Some checks failed
CI / test (pull_request) Failing after 17s
API CI / api-tests (pull_request) Failing after 31s

This commit is contained in:
Tim Lorsbach
2026-06-23 21:20:02 +02:00
parent 687a90af0e
commit 0842f67560
4 changed files with 68 additions and 27 deletions

View File

@ -89,14 +89,13 @@ class BB4G(Classifier):
}
started = False
retries = 0
while not started and retries < 5:
while not started:
res = requests.post(f"{self.url}/start", headers=header, data={}, proxies=s.PROXIES or None)
logger.info(f"Starting BB4G: {res.status_code}")
if res.status_code == 200:
started = True
elif res.status_code in [500, 502]:
retries += 1
import time
time.sleep(5)
else:
@ -171,7 +170,7 @@ class BB4G(Classifier):
}
retries = 0
while retries < 5:
while retries < 100:
resp = requests.post(f"{self.url}/compute", headers=header, data=json.dumps(data),
proxies=s.PROXIES or None)
@ -179,7 +178,7 @@ class BB4G(Classifier):
retries += 1
logger.info(f"BB4G predict hit a 418, retrying in 60 seconds")
import time
time.sleep(60)
time.sleep(3)
continue
resp.raise_for_status()