Skip to content
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

Add a dedicated manual maintenance mode flag #757

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

bloodearnest
Copy link
Member

Currently, manually enabling database maintenance mode is awkward, as by
default it will just get switch off again by the regular automatic
check. So you have to remember to stop that first, which is awkward,
then restart it, for more awkwardness

Instead, this change adds an explicit flag check for
manual-db-maintenance - if that is set, we skip the automated check
altogether.

This will be added to the jobrunner justfile in backend-server as
a documented command in a separate PR.

Currently, manually enabling database maintenance mode is awkward, as by
default it will just get switch off again by the regular automatic
check. So you have to remember to stop that first, which is awkward,
then restart it, for more awkwardness

Instead, this change adds an explicit flag check for
`manual-db-maintenance` - if that is set, we skip the automated check
altogether.

This will be added to the jobrunner justfile in backend-server as
a documented command in a separate PR.
Copy link
Contributor

@evansd evansd left a comment

Choose a reason for hiding this comment

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

:+1 I can definitely think of previous situations where this would have saved time and confusion.

As an aside (not a comment on this PR) we're use the string "db-maintenance" an awful lot in the code. It would seem worth replacing with a constant, given how easy I find it to misspell "maintenance".

@bloodearnest
Copy link
Member Author

:+1 I can definitely think of previous situations where this would have saved time and confusion.

As an aside (not a comment on this PR) we're use the string "db-maintenance" an awful lot in the code. It would seem worth replacing with a constant, given how easy I find it to misspell "maintenance".

Yeah, I think we should probably change the name of the flag from mode=db-maintenance to db-maintenance=on. Originally, mode was intended to be multiple modes (e.g. paused), but that ended up needing to be a different thing.

I will add a constant for now

@bloodearnest bloodearnest merged commit 9c36c60 into main Oct 14, 2024
20 checks passed
@bloodearnest bloodearnest deleted the manual-db-maintenance-mode branch October 14, 2024 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants