Skip to content

feat: maintenance mode for web#2740

Merged
acasajus merged 4 commits into
masterfrom
feature/maintenance-mode
Jun 5, 2026
Merged

feat: maintenance mode for web#2740
acasajus merged 4 commits into
masterfrom
feature/maintenance-mode

Conversation

@cquintana92

Copy link
Copy Markdown
Collaborator

This PR implements a "Maintenance Mode" for the webapp, where all requests (except static and healthcheck) return 503 and show a maintenance page. It does it by extracting logic from server.py and moving it into simplelogin_app.py alongside a maintenance_app.py, making server.py determine whether it's in maintenance mode based on the new config.py directive. If in maintenance mode, the web app doesn't even try to connect to the database, so it always works regardless of the connection status.

Maintenance mode for email_handler.py is not implemented in this PR as it requires some bigger changes.

@cquintana92 cquintana92 added the enhancement New feature or request label Jun 4, 2026
@cquintana92 cquintana92 force-pushed the feature/maintenance-mode branch from 1f7e31f to 3bcb6cd Compare June 4, 2026 06:53
Comment thread maintenance_app.py

@app.before_request
def maintenance():
if (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you could convert this to an if not and return the jsonify error below and then everything would 503 except these no?

Comment thread simplelogin_app.py Outdated
@acasajus acasajus merged commit 91ebfa3 into master Jun 5, 2026
3 checks passed
@acasajus acasajus deleted the feature/maintenance-mode branch June 5, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants