Skip to content

Commit c20733a

Browse files
committed
Simplify ignore_cancel; remove prints
1 parent 5433fcf commit c20733a

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

singlestoredb/functions/ext/asgi.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,15 +1060,10 @@ async def __call__(
10601060
),
10611061
),
10621062
)
1063-
if ignore_cancel:
1064-
print('Ignoring client disconnects')
1065-
disconnect_task = asyncio.create_task(
1066-
asyncio.sleep(int(1e9)),
1067-
)
1068-
else:
1069-
disconnect_task = asyncio.create_task(
1070-
cancel_on_disconnect(receive),
1071-
)
1063+
disconnect_task = asyncio.create_task(
1064+
asyncio.sleep(int(1e9))
1065+
if ignore_cancel else cancel_on_disconnect(receive),
1066+
)
10721067
timeout_task = asyncio.create_task(
10731068
cancel_on_timeout(func_info['timeout']),
10741069
)
@@ -1281,7 +1276,6 @@ def get_function_info(
12811276
f'Could not parse docstring for function {key}: {e}',
12821277
)
12831278

1284-
print(doc_params)
12851279
if not func_name or key == func_name:
12861280
sig = info['signature']
12871281
args = []

0 commit comments

Comments
 (0)