mirror of
https://github.com/osmarks/autobotrobot
synced 2024-10-29 21:16:17 +00:00
fix failovers
This commit is contained in:
parent
a311f30602
commit
dd3776ea1e
@ -386,6 +386,8 @@ async def generate(sess: aiohttp.ClientSession, prompt, stop=["\n"]):
|
|||||||
try:
|
try:
|
||||||
result = await generate_raw(sess, backend, prompt, stop)
|
result = await generate_raw(sess, backend, prompt, stop)
|
||||||
backend_successes.labels(backend["url"]).inc()
|
backend_successes.labels(backend["url"]).inc()
|
||||||
|
failure_stats = last_failures[backend["url"]]
|
||||||
|
failure_stats.consecutive_failures = 0
|
||||||
return result
|
return result
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
backend_failures.labels(backend["url"]).inc()
|
backend_failures.labels(backend["url"]).inc()
|
||||||
|
Loading…
Reference in New Issue
Block a user