File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ async def readiness_check():
5555 is_kafka_healthy = await kafka_health_check ()
5656 is_db_healthy = await database_health_check ()
5757 is_dbsync_healthy = await dbsync_health_check ()
58-
5958 backend_health_stat = {
6059 "isHealthy" : is_db_healthy and is_kafka_healthy and is_dbsync_healthy ,
6160 "details" : {
@@ -88,10 +87,7 @@ async def database_health_check():
8887async def kafka_health_check ():
8988 last_poll_timestamp = await kafka_service .fetch_latest_poll_timestamp ()
9089 current_timestamp = int (datetime .timestamp (datetime .now ()) * 1000 )
91- if (
92- last_poll_timestamp
93- and (current_timestamp - last_poll_timestamp ) < 3000
94- and (current_timestamp - last_poll_timestamp ) > 0
95- ):
90+ if last_poll_timestamp and 30000 > (current_timestamp - last_poll_timestamp ) > 0 :
9691 return True
92+ print ("time difference : " , current_timestamp - last_poll_timestamp )
9793 return False
Original file line number Diff line number Diff line change 2424
2525root_api_router = APIRouter (prefix = "/api" )
2626
27- # For ready status Api
27+ # For health status Api
2828root_api_router .include_router (health .router , tags = ["health" ])
2929
3030# For Demo Ping APi
You can’t perform that action at this time.
0 commit comments