Skip to content

Commit

Permalink
Merge pull request #1193 from benfitzpatrick/restart-runahead
Browse files Browse the repository at this point in the history
cylc restart: fix 'runahead' state handling
  • Loading branch information
matthewrmshin authored and benfitzpatrick committed Oct 22, 2014
1 parent f43d9df commit 98d99e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions bin/cylc-restart
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ determine what happened to them while the suite was down."""
taskstates = {}
task_point_strings = []
for line in task_lines:

if re.match( '^class', line ):
# class variables
[ left, right ] = line.split( ' : ' )
Expand Down Expand Up @@ -339,9 +338,13 @@ determine what happened to them while the suite was down."""
id = new_id
tasknames[name] = True
if 'status=submitting,' in state:
# backward compabitility for state dumps generated prior to #787
# backward compatibility for state dumps generated prior to #787
state = state.replace('status=submitting,',
'status=ready,', 1)
if 'status=runahead,' in state:
# backward compatibility for pre-cylc-6 state dumps.
state = state.replace(
'status=runahead,', 'status=waiting,', 1)
try:
task_state(state)
except Exception as e:
Expand Down
3 changes: 2 additions & 1 deletion tests/restart/back-comp-restart/state
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ baz.2014050200 : status=succeeded, spawned=true
baz.2014050206 : status=waiting, spawned=false
foo.2014050200 : status=succeeded, spawned=true
foo.2014050206 : status=waiting, spawned=false
qux.2014050206 : status=running, spawned=false
qux.2014050206 : status=running, spawned=true
qux.2014050212 : status=runahead, spawned=false
wibble.2014050206 : status=waiting, spawned=false

0 comments on commit 98d99e4

Please sign in to comment.