-
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
Data import: maintenance mode during data update #22
Comments
I definitely agree with you. |
Yeah. But I'll also implement also a check in the "sending alert" code to make sure they just it just waits if maintenance mode is on (so we don't break everything because we decided to change hours or because the server time is incorrect) |
Yes, for sure! 👍 |
The occurrence import is now atomic (#62). If all goes well, we should be able to tackle this simply and elegantly using the following logic:
|
I find it a good workflow, it's defensive enough, I think. One small question, maybe trascurable problem: what to do with downloaded data in 1 if 4 happens for many consecutive days (e.g. you and your hpothetic back-up person are both on holidays)? Probably memory it's not a big issue, right? |
@damianooldoni: Indeed, I don't expect any disk space problem:
|
Update: I'm considering using https://github.com/fabiocaccamo/django-maintenance-mode for the maintenance mode itself. |
This is working fine for years, IU think we can close this! |
There's now a mechanism in place to automatically refresh data by downloading from GBIF.
During this process, the database spends a few minutes in a messed up state (occurrence duplicates because new data is added before the previous one is deleted, ...).
We need to show the website as temporarily unavailable during this time to avoid presenting incorrect data to users. I consider using django-maintenance-mode for that.
Additional considerations:
infrastructure: we'll need an alert (mail? others) for urgent intervention if the website stays for too long in maintenance mode (error during the data import process: GBIF outage, bug, ...)(not needed thanks to transactions)The text was updated successfully, but these errors were encountered: