Comments (3)
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.
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.
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)
- Add new setting to expire the user session HOT 4
- ModuleNotFoundError: 'utils.middleware.maintenance' While running testcases HOT 1
- Add Django Cache Backend HOT 2
- Support JSON content type HOT 2
- `set_maintenance_mode` should use atomic write. HOT 8
- `manage.py maintenance_mode on/off` changes permissions of state file HOT 12
- Inherit state file permissions from the directory where it is created.
- File Write Errors on Windows Systems HOT 6
- Banner for all templates to warn users when maintenance will be HOT 1
- 404 Not Found Error When SCRIPT_NAME Defined HOT 10
- FileNotFoundError with default settings HOT 1
- IGNORE_IP not working HOT 6
- CommandError: Unable to write state file at: maintenance_mode_state.txt HOT 1
- Working fine on dev box but not functioning on test box with virtual directory HOT 11
- force_maintenance_mode_off doesn't work for AJAX requests HOT 1
- Problem with ipware version HOT 1
- Unable to use with s3 storage HOT 4
- Add maintenance mode toggler in the admin site HOT 1
- MAINTENANCE_MODE_STATE_FILE_PATH setting bug HOT 2
- Drop `Python < 3.8` and `Django < 2.2` support.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-maintenance-mode.