- turned model_variables into a class with lazy loading

- some improvements to Healthchecks
This commit is contained in:
Josako
2024-09-24 10:48:52 +02:00
parent 67bdeac434
commit a740c96630
16 changed files with 382 additions and 191 deletions

View File

@@ -20,7 +20,7 @@ def liveness():
def readiness():
checks = {
"database": check_database(),
# "celery": check_celery(),
"celery": check_celery(),
# Add more checks as needed
}
@@ -41,7 +41,7 @@ def check_database():
def check_celery():
try:
# Send a simple task to Celery
result = current_celery.send_task('tasks.ping', queue='llm_interactions')
result = current_celery.send_task('ping', queue='llm_interactions')
response = result.get(timeout=10) # Wait for up to 10 seconds for a response
return response == 'pong'
except CeleryTimeoutError: