Code Monkey home page Code Monkey logo

Comments (3)

fabiocaccamo avatar fabiocaccamo commented on June 7, 2024 1

Hi @scwall,
thank you for this suggestion.
Maintenance-mode schedule is already in the 'todo' of this library.

Frankly my idea was to add support to it using a simple setting:

settings.MAINTENANCE_MODE_SCHEDULE = {
    'sun': {'start':'01:00', 'end':'02:00'},
    'mon': None,
    'tue': None,
    'wed': {'start':'01:00', 'end':'02:00'},
    'thu': None,
    'fri': None,
    'sat': None,
}

# or this to schedule maintenance every day:
settings.MAINTENANCE_MODE_SCHEDULE = {
    '*': {'start':'01:00', 'end':'02:00'},
}

Now, looking at your suggestion, I understand the flexibility to manage maintenance schedule using the admin and also the necessity to send an email to users to warn them about the incoming maintenance (which needs a cronjob).

Actually this library doesn't use database at all and I would prefer to keep it tiny and db free, but I also want to implement maintenance schedule in the best and flexible way...

I take some time to think better about it, in the meanwhile any other idea/suggestion will be appreciated.

from django-maintenance-mode.

scwall avatar scwall commented on June 7, 2024

Ok I understand, maybe adding an external yarml file for the hours, for don't modify settings file . Personally I will have to use a db, because I use docker (with dj cookie cutter) for the deployment of my projects. If I change the settings I will have to rebuild my image and redeploy it just to publish the time. For the use of a recurring stain: https://pypi.org/project/django-crontab/ is quite light.

example maintenance.yml:

schelude:
  - date: 14/05/2020
    start_time: 12h20
    end_time: 14h30
  - date: 14/05/2021
    start_time: 10h20
    end_time: 19h30

from django-maintenance-mode.

fabiocaccamo avatar fabiocaccamo commented on June 7, 2024

I close this issue because it is very similar to another one, everything related to maintenance mode schedule will be discussed in #64.

from django-maintenance-mode.

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.