Skip to content

Commit e2c408c

Browse files
committed
added logs to test async
1 parent 0a93fd7 commit e2c408c

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

singlestoredb/functions/ext/asgi.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,9 @@ async def do_func(
280280
'''Call function on given rows of data.'''
281281
return row_ids, [as_tuple(x) for x in zip(func_map(func, rows))]
282282

283+
print("building scalar endpoint")
283284
return do_func
284-
285+
print("building vector endpoint")
285286
return build_vector_udf_endpoint(func, returns_data_format)
286287

287288

@@ -323,13 +324,21 @@ async def do_func(
323324
if cols and cols[0]:
324325
if is_async:
325326
out = await func(*[x if m else x[0] for x, m in zip(cols, masks)])
327+
print("v1")
328+
print(out)
326329
else:
327330
out = await asyncio.to_thread(func, *[x if m else x[0] for x, m in zip(cols, masks)])
331+
print("v2")
332+
print(out)
328333
else:
329334
if is_async:
330335
out = await func()
336+
print("v3")
337+
print(out)
331338
else:
332339
out = await asyncio.to_thread(func())
340+
print("v4")
341+
print(out)
333342

334343
# Single masked value
335344
if isinstance(out, Masked):

0 commit comments

Comments
 (0)