Skip to content

Commit b2f0dbc

Browse files
committed
fix
1 parent 4ecb6b8 commit b2f0dbc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

unstructured_platform_plugins/etl_uvicorn/api_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ async def invoke_async_gen_func(func: Callable, kwargs: Optional[dict[str, Any]]
5656
async def invoke_func(func: Callable, kwargs: Optional[dict[str, Any]] = None) -> Any:
5757
kwargs = kwargs or {}
5858
if inspect.iscoroutinefunction(func):
59-
yield await func(**kwargs)
59+
return await func(**kwargs)
6060
else:
61-
yield await asyncio.get_event_loop().run_in_executor(None, partial(func, **kwargs))
61+
return await asyncio.get_event_loop().run_in_executor(None, partial(func, **kwargs))
6262

6363

6464
def check_precheck_func(precheck_func: Callable):

0 commit comments

Comments
 (0)