-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make occurrence import process atomic #62
Comments
Or both? By using transactions towards a copy of the db? |
Update: after going through the documentation, using Django's transaction support (via context manager or decorator) doesn't seem too complex/scary. So I might try this route first. |
I've now implemented a simple atomic block wrapping all the database changes during data import. On paper it looks perfect for our purpose, but we'll need to aggressively test the robustness (it looks to good to be true :) ) |
Now implemented, we're lacking:
|
It would be great to have a robust mechanism to ensure the data update process happens atomically: either the Django command is successful, either the data is left unchanged (and the data update will be tried again the next day).
Possible approaches for this:
I currently favour the second option for its simplicity. Might be related/entangled with riparias/early-alert-webapp#14.
remark: even if we work on a copy of the database, don't forget to put the website in maintenance mode (#22) right before we copy the database so we are sure no changes are done (new comments added to occurrences, for example).
The text was updated successfully, but these errors were encountered: