Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -92,7 +92,7 @@ def _connect_until_success():
|
|
| 92 |
node_id = os.getenv("NODE_ID", socket.gethostname())
|
| 93 |
ip = _get_local_ip(pd)
|
| 94 |
print(f"🔎 Trying server: {server}")
|
| 95 |
-
|
| 96 |
any_attempt = False
|
| 97 |
for p in _sequential_ports(pd):
|
| 98 |
any_attempt = True
|
|
@@ -120,6 +120,9 @@ def _connect_until_success():
|
|
| 120 |
def start_connect_loop():
|
| 121 |
threading.Thread(target=_connect_until_success, daemon=True).start()
|
| 122 |
|
|
|
|
|
|
|
|
|
|
| 123 |
# مسار اختبار سريع
|
| 124 |
@app.get("/")
|
| 125 |
def hello():
|
|
|
|
| 92 |
node_id = os.getenv("NODE_ID", socket.gethostname())
|
| 93 |
ip = _get_local_ip(pd)
|
| 94 |
print(f"🔎 Trying server: {server}")
|
| 95 |
+
print("🚀 Started connection attempt loop")
|
| 96 |
any_attempt = False
|
| 97 |
for p in _sequential_ports(pd):
|
| 98 |
any_attempt = True
|
|
|
|
| 120 |
def start_connect_loop():
|
| 121 |
threading.Thread(target=_connect_until_success, daemon=True).start()
|
| 122 |
|
| 123 |
+
print("🌀 Launching connection thread") # ← أضف هنا أيضًا
|
| 124 |
+
threading.Thread(target=_connect_until_success, daemon=True).start()
|
| 125 |
+
|
| 126 |
# مسار اختبار سريع
|
| 127 |
@app.get("/")
|
| 128 |
def hello():
|