corrected patient skid
This commit is contained in:
parent
e8755bd1de
commit
41c8d49d31
16
main.py
16
main.py
|
|
@ -470,6 +470,22 @@ async def update_latest_flow():
|
|||
await asyncio.sleep(1.0)
|
||||
|
||||
|
||||
def stop_patient_skid():
|
||||
try:
|
||||
url = f"http://192.168.1.28:8000/stop_test"
|
||||
response = httpx.get(url, timeout=5.0)
|
||||
|
||||
if response.status_code == 200:
|
||||
return {"status": "success", "detail": response.json()}
|
||||
else:
|
||||
raise HTTPException(
|
||||
status_code=502, detail=f"Remote server error: {response.text}"
|
||||
)
|
||||
except httpx.RequestError as e:
|
||||
raise HTTPException(
|
||||
status_code=500, detail=f"Request to external server failed: {str(e)}"
|
||||
)
|
||||
|
||||
def set_patient_skid_users(count: int = 1):
|
||||
try:
|
||||
url = f"http://192.168.1.28:8000/set_users/{count}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user