Spaces:
Running
Running
added upstash
Browse files
aiven_keep_alive_service.py
CHANGED
|
@@ -61,7 +61,7 @@ def ping_mysql() -> AivenPingResponse:
|
|
| 61 |
|
| 62 |
logger.info(f"MySQL ping successful: {host}")
|
| 63 |
return AivenPingResponse(
|
| 64 |
-
service_name=database,
|
| 65 |
success=True,
|
| 66 |
error=None,
|
| 67 |
time=now,
|
|
|
|
| 61 |
|
| 62 |
logger.info(f"MySQL ping successful: {host}")
|
| 63 |
return AivenPingResponse(
|
| 64 |
+
service_name=f"aiven_service:{database}",
|
| 65 |
success=True,
|
| 66 |
error=None,
|
| 67 |
time=now,
|
mongodb_keep_alive_service.py
CHANGED
|
@@ -63,7 +63,7 @@ def ping_mongodb() -> list[MongoPingResponse]:
|
|
| 63 |
logger.info(f"{service_name}: Successfully pinged MongoDB at {uri[:50]}...")
|
| 64 |
responses.append(
|
| 65 |
MongoPingResponse(
|
| 66 |
-
service_name=service_name,
|
| 67 |
success=True,
|
| 68 |
error=None,
|
| 69 |
time=now
|
|
|
|
| 63 |
logger.info(f"{service_name}: Successfully pinged MongoDB at {uri[:50]}...")
|
| 64 |
responses.append(
|
| 65 |
MongoPingResponse(
|
| 66 |
+
service_name=f"mongodb_service:{service_name}",
|
| 67 |
success=True,
|
| 68 |
error=None,
|
| 69 |
time=now
|
neondb_postgres_keep_alive_service.py
CHANGED
|
@@ -50,7 +50,7 @@ def ping_neondb() -> list[NeonDBPingResponse]:
|
|
| 50 |
logger.info(f"Successfully connected to database '{db_name}' on {host}")
|
| 51 |
responses.append(
|
| 52 |
NeonDBPingResponse(
|
| 53 |
-
service_name=db_name,
|
| 54 |
success=True,
|
| 55 |
error=None,
|
| 56 |
time=now,
|
|
|
|
| 50 |
logger.info(f"Successfully connected to database '{db_name}' on {host}")
|
| 51 |
responses.append(
|
| 52 |
NeonDBPingResponse(
|
| 53 |
+
service_name=f"neondb_postgres_service:{db_name}",
|
| 54 |
success=True,
|
| 55 |
error=None,
|
| 56 |
time=now,
|
pinecone_keep_alive_service.py
CHANGED
|
@@ -30,7 +30,7 @@ class PineconePingResponse(BaseModel):
|
|
| 30 |
|
| 31 |
|
| 32 |
class PineconePingAllResponse(BaseModel):
|
| 33 |
-
|
| 34 |
|
| 35 |
|
| 36 |
def ping_all_pinecone_indexes() -> PineconePingAllResponse:
|
|
@@ -88,4 +88,4 @@ def ping_all_pinecone_indexes() -> PineconePingAllResponse:
|
|
| 88 |
)
|
| 89 |
)
|
| 90 |
|
| 91 |
-
return PineconePingAllResponse(
|
|
|
|
| 30 |
|
| 31 |
|
| 32 |
class PineconePingAllResponse(BaseModel):
|
| 33 |
+
pinecone_services: list[PineconePingResponse]
|
| 34 |
|
| 35 |
|
| 36 |
def ping_all_pinecone_indexes() -> PineconePingAllResponse:
|
|
|
|
| 88 |
)
|
| 89 |
)
|
| 90 |
|
| 91 |
+
return PineconePingAllResponse(pinecone_services=results)
|
redis_keep_alive_service.py
CHANGED
|
@@ -55,7 +55,7 @@ class RedisPingResponse(BaseModel):
|
|
| 55 |
|
| 56 |
|
| 57 |
class RedisPingAllResponse(BaseModel):
|
| 58 |
-
|
| 59 |
|
| 60 |
|
| 61 |
# ---------- Self-managed Redis ----------
|
|
@@ -192,4 +192,4 @@ def ping_all_redis_projects() -> RedisPingAllResponse:
|
|
| 192 |
results.append(ping_redis(service_name, config))
|
| 193 |
|
| 194 |
logger.info("Completed all Redis service checks")
|
| 195 |
-
return RedisPingAllResponse(
|
|
|
|
| 55 |
|
| 56 |
|
| 57 |
class RedisPingAllResponse(BaseModel):
|
| 58 |
+
redis_services: list[RedisPingResponse]
|
| 59 |
|
| 60 |
|
| 61 |
# ---------- Self-managed Redis ----------
|
|
|
|
| 192 |
results.append(ping_redis(service_name, config))
|
| 193 |
|
| 194 |
logger.info("Completed all Redis service checks")
|
| 195 |
+
return RedisPingAllResponse(redis_services=results)
|
supabase_keep_alive_service.py
CHANGED
|
@@ -143,7 +143,7 @@ def ping_all_supabase_projects() -> list[SupabasePingResponse]:
|
|
| 143 |
"""Ping all Supabase projects and return structured responses."""
|
| 144 |
responses: list[SupabasePingResponse] = []
|
| 145 |
for service_name in SUPABASE_PROJECTS:
|
| 146 |
-
responses.append(ping_supabase(service_name))
|
| 147 |
return responses
|
| 148 |
|
| 149 |
|
|
|
|
| 143 |
"""Ping all Supabase projects and return structured responses."""
|
| 144 |
responses: list[SupabasePingResponse] = []
|
| 145 |
for service_name in SUPABASE_PROJECTS:
|
| 146 |
+
responses.append(ping_supabase(f"supabase_service:{service_name}"))
|
| 147 |
return responses
|
| 148 |
|
| 149 |
|