Skip to content

Commit

Permalink
Merge pull request #3289 from radical-cybertools/fix/task_target_state
Browse files Browse the repository at this point in the history
target state is interpreted *after* output staging
  • Loading branch information
andre-merzky authored Dec 16, 2024
2 parents 1eb596c + 70c6bc6 commit 2618c57
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/radical/pilot/task_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ def _update_tasks(self, task_dicts):
current = task.state
target = task_dict['state']

if 'target_state' in task_dict:
target = task_dict['target_state']
# if 'target_state' in task_dict:
# target = task_dict['target_state']

if current == target:
self._log.debug('tmgr: state known: %s', uid)
Expand Down
7 changes: 7 additions & 0 deletions src/radical/pilot/tmgr/staging_output/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ def work(self, tasks):

for task in tasks:

# we only handle staging for tasks which end up in `DONE` state
target_state = task.get('target_state')
if target_state and target_state != rps.DONE:
self._log.debug('skip staging for %s', task['uid'])
no_staging_tasks.append(task)
continue

# check if we have any staging directives to be enacted in this
# component
actionables = list()
Expand Down

0 comments on commit 2618c57

Please sign in to comment.