Update app.py
Browse files
app.py
CHANGED
|
@@ -113,6 +113,18 @@ async def receive_update(request: Request):
|
|
| 113 |
return {"status": "ok"}
|
| 114 |
|
| 115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
# Run the server
|
| 117 |
if __name__ == "__main__":
|
| 118 |
import uvicorn
|
|
|
|
| 113 |
return {"status": "ok"}
|
| 114 |
|
| 115 |
|
| 116 |
+
async def check_internet():
|
| 117 |
+
try:
|
| 118 |
+
async with httpx.AsyncClient() as client:
|
| 119 |
+
response = await client.get("https://api.telegram.org")
|
| 120 |
+
print(f"Network test successful! Status Code: {response.status_code}")
|
| 121 |
+
except Exception as e:
|
| 122 |
+
print(f"Network test failed: {e}")
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
asyncio.run(check_internet())
|
| 126 |
+
|
| 127 |
+
|
| 128 |
# Run the server
|
| 129 |
if __name__ == "__main__":
|
| 130 |
import uvicorn
|