feat(admin): rewire launch-app to check-for-updates UI nav + frontend polling
This commit is contained in:
+7
-4
@@ -2841,11 +2841,14 @@ async def admin_msfs_sync_task(task_id: str):
|
||||
|
||||
@app.post("/api/admin/msfs-sync/launch-app")
|
||||
async def admin_msfs_sync_launch():
|
||||
"""Launch the MS Field Service app on the connected phone."""
|
||||
"""Launch MS Field Service app, navigate to Check for Updates via UI nav.
|
||||
|
||||
Taps globe icon in top-right, waits 15s, taps Check for Updates button,
|
||||
then waits for the phone's offline DB to stabilize.
|
||||
"""
|
||||
try:
|
||||
async with httpx.AsyncClient(timeout=15) as client:
|
||||
resp = await client.post(f"{EXTRACTION_SYNC_BASE}/api/sync/start")
|
||||
# The start endpoint already launches the app
|
||||
async with httpx.AsyncClient(timeout=30) as client:
|
||||
resp = await client.post(f"{EXTRACTION_SYNC_BASE}/api/sync/check-for-updates")
|
||||
return resp.json()
|
||||
except httpx.RequestError as e:
|
||||
raise HTTPException(502, f"Extraction server unreachable: {e}")
|
||||
|
||||
Reference in New Issue
Block a user