This commit is contained in:
Jörn-Michael Miehe 2022-09-04 17:29:11 +00:00
parent 2c778b0d3a
commit 46e39b97e9

View file

@ -14,8 +14,9 @@ _logger = logging.getLogger(__name__)
async def _get_buffer( async def _get_buffer(
remote_path: Any, remote_path: Any,
) -> BytesIO: ) -> BytesIO:
@run_in_executor @run_in_executor
def buffer_inner(resource: Resource) -> BytesIO: def _get_buffer_inner(resource: Resource) -> BytesIO:
_logger.info(f"updating {resource}") _logger.info(f"updating {resource}")
print(f"updating {resource}") print(f"updating {resource}")
buffer = BytesIO() buffer = BytesIO()
@ -23,7 +24,7 @@ async def _get_buffer(
return buffer return buffer
resource = webdav_resource(remote_path) resource = webdav_resource(remote_path)
return await buffer_inner(resource) return await _get_buffer_inner(resource)
@dataclass(frozen=True) @dataclass(frozen=True)