Hfzune commited on
Commit
cc27ef5
·
verified ·
1 Parent(s): 2d239d7

Create utils/health.py

Browse files
Files changed (1) hide show
  1. utils/health.py +11 -0
utils/health.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import time
2
+ from datetime import datetime, timezone
3
+
4
+
5
+ def health_payload(boot_time: float) -> dict:
6
+ return {
7
+ "ok": True,
8
+ "service": "qwen-telegram-bot",
9
+ "uptime_seconds": int(time.time() - boot_time),
10
+ "timestamp": datetime.now(timezone.utc).isoformat(),
11
+ }