Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
## 0.0.4

### Fixes

* Do not block event loop when running plugin code

## 0.0.3

### Features

* **OTEL middleware added**


## 0.0.2

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion unstructured_platform_plugins/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.3" # pragma: no cover
__version__ = "0.0.4" # pragma: no cover
3 changes: 2 additions & 1 deletion unstructured_platform_plugins/etl_uvicorn/api_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import inspect
import json
import logging
from functools import partial
from typing import Any, Callable, Optional

from fastapi import FastAPI, status
Expand Down Expand Up @@ -33,7 +34,7 @@ async def invoke_func(func: Callable, kwargs: Optional[dict[str, Any]] = None) -
if inspect.iscoroutinefunction(func):
return await func(**kwargs)
else:
return func(**kwargs)
return await asyncio.get_event_loop().run_in_executor(None, partial(func, **kwargs))


def check_precheck_func(precheck_func: Callable):
Expand Down
Loading