Skip to content

Commit 294807d

Browse files
committed
switch to sync gql transport
1 parent a2e68c3 commit 294807d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

linear/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from dotenv import load_dotenv
66
from gql import Client
7-
from gql.transport.aiohttp import AIOHTTPTransport
7+
from gql.transport.requests import RequestsHTTPTransport
88

99
load_dotenv()
1010

@@ -53,7 +53,8 @@ def _get_client():
5353
client = getattr(_thread_local, "client", None)
5454
if client is None:
5555
headers = {"Authorization": os.getenv("LINEAR_API_KEY")}
56-
transport = AIOHTTPTransport(
56+
# Use the requests transport to avoid asyncio loop cleanup issues on exit.
57+
transport = RequestsHTTPTransport(
5758
url="https://api.linear.app/graphql",
5859
headers=headers,
5960
)

0 commit comments

Comments
 (0)