This commit is contained in:
Jörn-Michael Miehe 2022-09-04 20:50:24 +00:00
parent fe31c9e52e
commit 608f62b090
2 changed files with 4 additions and 4 deletions

View file

@ -25,10 +25,10 @@ async def _get_calendar(
) -> Calendar:
@run_in_executor
def _get_calendar_inner() -> Calendar:
def _inner() -> Calendar:
return caldav_principal().calendar(calendar_name)
return await _get_calendar_inner()
return await _inner()
@timed_alru_cache(maxsize=20)

View file

@ -16,7 +16,7 @@ async def _get_buffer(
) -> BytesIO:
@run_in_executor
def _get_buffer_inner(resource: Resource) -> BytesIO:
def _inner(resource: Resource) -> BytesIO:
_logger.info(f"updating {resource}")
print(f"updating {resource}")
buffer = BytesIO()
@ -24,7 +24,7 @@ async def _get_buffer(
return buffer
resource = webdav_resource(remote_path)
return await _get_buffer_inner(resource)
return await _inner(resource)
@dataclass(frozen=True)