From ef12c693b948e2970e77b6f91e2b28e1c7e0bcbf Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Mon, 30 Dec 2024 21:02:39 +0500 Subject: [PATCH] Use new method for retrieving datasets of paths --- src/middlewared/middlewared/plugins/apps/resources.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/middlewared/middlewared/plugins/apps/resources.py b/src/middlewared/middlewared/plugins/apps/resources.py index 1f572604a64bb..ea47709006b0b 100644 --- a/src/middlewared/middlewared/plugins/apps/resources.py +++ b/src/middlewared/middlewared/plugins/apps/resources.py @@ -1,5 +1,6 @@ from middlewared.schema import accepts, Bool, Dict, Int, List, Ref, returns, Str -from middlewared.service import CallError, private, Service +from middlewared.service import private, Service +from middlewared.plugins.zfs_.utils import paths_to_datasets_impl from middlewared.utils.gpu import get_nvidia_gpus @@ -151,4 +152,4 @@ async def get_hostpaths_datasets(self, app_name): if volume['source'].startswith(f'{IX_APPS_MOUNT_PATH}/') is False ] - return await self.middleware.call('zfs.dataset.paths_to_datasets', host_paths) + return await self.middleware.run_in_thread(paths_to_datasets_impl, host_paths)