Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure state setting #3226

Merged
merged 5 commits into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/radical/pilot/task_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,6 @@ def _state_sub_cb(self, topic, msg):
things = ru.as_list(arg)
tasks = [thing for thing in things if thing.get('type') == 'task']

# for task in tasks:
# self._log.debug('tmgr: task state update: %s [%s]',
# task['uid'], task['state'])

self._update_tasks(tasks)

return True
Expand All @@ -357,7 +353,6 @@ def _state_sub_cb(self, topic, msg):
#
def _update_tasks(self, task_dicts):


# return information about needed callback and advance activities, so
# that we don't break bulks here.
# note however that individual task callbacks are still being called on
Expand Down Expand Up @@ -399,6 +394,7 @@ def _update_tasks(self, task_dicts):
self._tasks[uid]._update(task_dict)
to_notify.append([task, s])

task_dict['state'] = target
ru.dict_merge(self._task_info[uid], task_dict, ru.OVERWRITE)

if to_notify:
Expand Down
Loading