From 12a75059f0a2bed482a03163d68d1ca2e0bf93e8 Mon Sep 17 00:00:00 2001 From: Wen Guan Date: Thu, 23 May 2024 14:06:19 +0200 Subject: [PATCH] fix async result initialization --- main/lib/idds/tests/panda_test.py | 2 +- workflow/lib/idds/iworkflow/work.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main/lib/idds/tests/panda_test.py b/main/lib/idds/tests/panda_test.py index 7c3233b7..1111bb72 100644 --- a/main/lib/idds/tests/panda_test.py +++ b/main/lib/idds/tests/panda_test.py @@ -65,7 +65,7 @@ task_ids = [169236, 169237, 169238, 169239, 169240, 169241] task_ids = [169272, 169273, 169312, 169313] task_ids = [169307, 169308, 169309, 169310, 169311, 169312, 169313, 169314] -task_ids = [i for i in range(169359, 169361)] +task_ids = [i for i in range(169359, 169363)] for task_id in task_ids: print("Killing %s" % task_id) ret = Client.killTask(task_id, verbose=True) diff --git a/workflow/lib/idds/iworkflow/work.py b/workflow/lib/idds/iworkflow/work.py index 03a390ee..48404ed3 100644 --- a/workflow/lib/idds/iworkflow/work.py +++ b/workflow/lib/idds/iworkflow/work.py @@ -804,7 +804,7 @@ def get_multi_jobs_kwargs_list(self): return multi_jobs_kwargs_list def init_async_result(self): - if not self._async_result_initialized or self._async_ret is None: + if not self._async_result_initialized: multi_jobs_kwargs_list = self.get_multi_jobs_kwargs_list() if multi_jobs_kwargs_list: self._async_ret = AsyncResult(self._context, name=self.get_func_name(), multi_jobs_kwargs_list=multi_jobs_kwargs_list, @@ -827,7 +827,7 @@ def stop_async_result(self): elif self._async_ret.is_failed: self._async_result_status = AsyncResultStatus.Failed self._async_ret = None - self._async_result_initialized = False + # self._async_result_initialized = False def wait_results(self): try: