Spaces:
Running
Running
sghorbal commited on
Commit ·
abbb598
1
Parent(s): a4ed0ef
add a cool down between pings
Browse files- src/app.py +3 -0
src/app.py
CHANGED
|
@@ -73,6 +73,9 @@ def ping_loop():
|
|
| 73 |
print(f"[ping] ✅ {url}")
|
| 74 |
except Exception as e:
|
| 75 |
print(f"[ping] ❌ {url} | {e}")
|
|
|
|
|
|
|
|
|
|
| 76 |
time.sleep(3600) # 1h
|
| 77 |
|
| 78 |
threading.Thread(target=ping_loop, daemon=True).start()
|
|
|
|
| 73 |
print(f"[ping] ✅ {url}")
|
| 74 |
except Exception as e:
|
| 75 |
print(f"[ping] ❌ {url} | {e}")
|
| 76 |
+
|
| 77 |
+
# Cooldown de 1 seconde entre les pings
|
| 78 |
+
time.sleep(1)
|
| 79 |
time.sleep(3600) # 1h
|
| 80 |
|
| 81 |
threading.Thread(target=ping_loop, daemon=True).start()
|