Skip to content

Reverse the task renames on RestartTask

Refs https://redmine.teklia.com/issues/7019

When restarting the initialisation task, the path to the elements.json file sent to workers is not updated, causing them to look for the old file instead of the one provided by initialisation_restart1. Instead of trying to update the path to this file, and maybe causing issues with other places where paths may be using task slugs in them, we can change the renaming strategy of RestartTask so that it renames the original tasks instead:

graph LR
  initialisation --> my_worker
  my_worker --> other_worker

After restarting initialisation, the graph now looks like this:

graph LR
  initialisation_old1
  initialisation --> my_worker
  my_worker --> other_worker