forked from 16BitNarwhal/Mijiji
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-job-error.py
More file actions
26 lines (19 loc) · 766 Bytes
/
check-job-error.py
File metadata and controls
26 lines (19 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python3
import asyncio
from fastmcp import Client
async def check_error():
client = Client("https://fastmcp-server-wf77.onrender.com/mcp")
async with client:
# Start a job to get a fresh error
job_result = await client.call_tool("search_web", {"query": "test"})
job_id = job_result.data["job_id"]
print(f"Started job: {job_id}")
# Wait and check error
await asyncio.sleep(15)
status_result = await client.call_tool("get_search_status", {"job_id": job_id})
status = status_result.data
print(f"Status: {status['status']}")
if "error" in status:
print(f"Error details: {status['error']}")
if __name__ == "__main__":
asyncio.run(check_error())