Giter VIP home page Giter VIP logo

Comments (8)

damianooldoni avatar damianooldoni commented on July 17, 2024

I definitely agree with you.
If we run the data import at night (I would say midnight) as you said AND the early warning system alerts are sent at 2pm for example, then we have time to check what is going wrong.

from gbif-alert.

niconoe avatar niconoe commented on July 17, 2024

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)

from gbif-alert.

damianooldoni avatar damianooldoni commented on July 17, 2024

Yes, for sure! 👍

from gbif-alert.

niconoe avatar niconoe commented on July 17, 2024

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:

  1. new data is downloaded from GBIF
  2. maintenance mode is set to ON (website inaccessible + no emails sent)
  3. the occurrence import is done (atomically: all changes or nothing in the database)
  4. if the transaction was aborted: send an email to administrators to check what happened
  5. in all cases, the maintenance is set to OFF (in worse case - transaction aborted - no new data will be visible in the website but at least the data is still perfectly consistent and the website isn't stuck in maintenance mode)

from gbif-alert.

damianooldoni avatar damianooldoni commented on July 17, 2024

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?

from gbif-alert.

niconoe avatar niconoe commented on July 17, 2024

@damianooldoni: Indeed, I don't expect any disk space problem:

  • The downloads are quite small (with the current species list, we're at 7 Mb / day)
  • In addition to that, the download happens in a temporary directory: as soon as the processes finish, the system knows this disk space can be freed when necessary.

from gbif-alert.

niconoe avatar niconoe commented on July 17, 2024

Update: I'm considering using https://github.com/fabiocaccamo/django-maintenance-mode for the maintenance mode itself.

from gbif-alert.

niconoe avatar niconoe commented on July 17, 2024

This is working fine for years, IU think we can close this!

from gbif-alert.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.