Change Evolver task execution to prepare and execute in batches.

Review Request #10566 — Created May 28, 2019 and submitted — Latest diff uploaded

Information

Django Evolution
master

Reviewers

Evolver now groups tasks by their type, and works with them in batches
based on the type. That means all tasks of a type will be
prepared/executed at once.

It's now up to the task's class to handle the preparation and execution
of the tasks. This allows them to compute state before or after, and to
alter the state passed to each task.

When executing tasks, each batch of tasks of a given type are, by
default, executed in a transaction specific to the batch. Subclasses can
change the logic as needed for transaction handling.

Unit tests pass on Django 1.7 and 1.11.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Change Evolver task execution to prepare and execute in batches.
`Evolver` now groups tasks by their type, and works with them in batches based on the type. That means all tasks of a type will be prepared/executed at once. It's now up to the task's class to handle the preparation and execution of the tasks. This allows them to compute state before or after, and to alter the state passed to each task. When executing tasks, each batch of tasks of a given type are, by default, executed in a transaction specific to the batch. Subclasses can change the logic as needed for transaction handling.
b2bf13d354d975a6ef4065891db664751c605e34 Christian Hammond
django_evolution/evolve.py
Loading...