mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-04 13:22:41 +02:00
fix: register Linear tools in TOOLS_WITH_UI and make GraphQL calls async
- Add create_linear_issue, update_linear_issue, delete_linear_issue to TOOLS_WITH_UI so the HIL approval cards are correctly dispatched to the Linear tool-ui components (without this the interrupt cards were never rendered) - Replace blocking requests.post with httpx.AsyncClient in LinearConnector.execute_graphql_query to avoid stalling the asyncio event loop during live streaming; remove now-unused requests import
This commit is contained in:
parent
9b838ec015
commit
2f9768b371
2 changed files with 7 additions and 2 deletions
|
|
@ -10,7 +10,6 @@ from datetime import datetime
|
|||
from typing import Any
|
||||
|
||||
import httpx
|
||||
import requests
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from sqlalchemy.future import select
|
||||
|
||||
|
|
@ -274,7 +273,10 @@ class LinearConnector:
|
|||
if variables:
|
||||
payload["variables"] = variables
|
||||
|
||||
response = requests.post(self.api_url, headers=headers, json=payload)
|
||||
async with httpx.AsyncClient() as client:
|
||||
response = await client.post(
|
||||
self.api_url, headers=headers, json=payload, timeout=30.0
|
||||
)
|
||||
|
||||
if response.status_code == 200:
|
||||
return response.json()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue