feat(crons): changed health-check response

This commit is contained in:
Taha Yassine Kraiem 2023-04-27 17:52:30 +02:00
parent 99dcc7cf78
commit 9bddd7def9
2 changed files with 5 additions and 10 deletions

View file

@ -170,11 +170,8 @@ def __get_sessions_stats(*_):
cur.execute(query)
row = cur.fetchone()
return {
"health": True,
"details": {
"numberOfSessionsCaptured": row["s_c"],
"numberOfEventCaptured": row["e_c"]
}
"numberOfSessionsCaptured": row["s_c"],
"numberOfEventCaptured": row["e_c"]
}

View file

@ -174,11 +174,8 @@ def __get_sessions_stats(tenant_id, *_):
cur.execute(query)
row = cur.fetchone()
return {
"health": True,
"details": {
"numberOfSessionsCaptured": row["s_c"],
"numberOfEventCaptured": row["e_c"]
}
"numberOfSessionsCaptured": row["s_c"],
"numberOfEventCaptured": row["e_c"]
}
@ -330,6 +327,7 @@ def weekly_cron():
params)
cur.execute(query)
def __check_database_ch(*_):
fail_response = {
"health": False,