Skip to content

Conversation

@bhuynhdev
Copy link

What

This PR looks to resolve #240 by allowing tasks to run in two stages, "before" or "after" copy, similar to how #1510 implemented pre-copy and post-copy migration tasks

How

  • Make Template.tasks function accept an additional argument stage
    • Pass this stage via extra_vars so that the rendering context knows which _stage we're in
    • Default tasks' condition to {{ _stage == 'after' }} so that the default behavior is post-copy tasks
  • In main.py: Change run_copy to execute tasks twice, before and after _render_template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow finer control over execution of tasks

1 participant