feat: перенос core-логики 2 лабы

This commit is contained in:
Enterxx2
2026-10-19 19:16:19 +03:00
parent 0ab3a341aa
commit aa971fbd27
110 changed files with 5177 additions and 6 deletions
+20
View File
@@ -0,0 +1,20 @@
import sys
import urllib.request
from config import APP_PORT
READY_URL = f"http://127.0.0.1:{APP_PORT}/health/ready"
REQUEST_TIMEOUT_SEC = 2
def main() -> int:
try:
with urllib.request.urlopen(READY_URL, timeout=REQUEST_TIMEOUT_SEC) as response:
return 0 if response.status == 200 else 1
except OSError:
return 1
if __name__ == "__main__":
sys.exit(main())