diff --git a/api/ovdashboard_api/dav_file.py b/api/ovdashboard_api/dav_file.py index c6f9902..2431995 100644 --- a/api/ovdashboard_api/dav_file.py +++ b/api/ovdashboard_api/dav_file.py @@ -14,8 +14,9 @@ _logger = logging.getLogger(__name__) async def _get_buffer( remote_path: Any, ) -> BytesIO: + @run_in_executor - def buffer_inner(resource: Resource) -> BytesIO: + def _get_buffer_inner(resource: Resource) -> BytesIO: _logger.info(f"updating {resource}") print(f"updating {resource}") buffer = BytesIO() @@ -23,7 +24,7 @@ async def _get_buffer( return buffer resource = webdav_resource(remote_path) - return await buffer_inner(resource) + return await _get_buffer_inner(resource) @dataclass(frozen=True)