Skip to content

Commit

Permalink
fix async result initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
wguanicedew committed May 23, 2024
1 parent 3c7605d commit 12a7505
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main/lib/idds/tests/panda_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions workflow/lib/idds/iworkflow/work.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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:
Expand Down

0 comments on commit 12a7505

Please sign in to comment.