-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify_sim.py
More file actions
23 lines (19 loc) · 863 Bytes
/
verify_sim.py
File metadata and controls
23 lines (19 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import requests
import time
BASE_URL = "http://localhost:8000"
def test_tick():
print("Triggering simulation tick...")
try:
# We need to find the tick endpoint.
# Based on previous context, run_tick is a background loop but there might be an admin trigger.
# Let's check if there's a /admin/tick or similar.
# For now, let's just check if the server is alive and logs are flowing.
resp = requests.get(f"{BASE_URL}/health")
print(f"Health check: {resp.status_code}")
print("Checking recent logs for errors...")
# Since we can't easily tail logs from python script while uvicorn is in another terminal,
# we'll just check if the processes are running.
except Exception as e:
print(f"Error connecting to server: {e}")
if __name__ == "__main__":
test_tick()