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

fix: enable maintenance mode only if there is an upgrade to perform #7129

Merged

Conversation

kirrg001
Copy link
Contributor

@kirrg001 kirrg001 commented Jul 25, 2016

refs #7125

Right now maintenance.enabled is always set to true on bootstrap. It could happen in theory, that the first request ends in a 503 response. Let's optimise that!

  • create isDatabaseOutOfDate fn for initial migration update checks
  • only set maintenance.enabled to true if migration needs to happen

@@ -77,7 +77,7 @@ migrateToDatabaseVersion = function migrateToDatabaseVersion(version, logger, mo
* ## Update
* Does a backup, then updates the database and fixtures
*/
update = function update(options) {
execute = function update(options) {

This comment was marked as abuse.

This comment was marked as abuse.

@ErisDS
Copy link
Member

ErisDS commented Jul 25, 2016

I feel like, after this is merged, it's probably worth doing some more migration testing, which I've not done for a little while. I don't have time this evening (gotta drive) but can do first thing in the morning.

@kirrg001 kirrg001 force-pushed the fix/check-if-migration-update-needs-to-happen branch 2 times, most recently from fe1a234 to 13b8569 Compare July 26, 2016 06:11
refs TryGhost#7125
- create isDatabaseOutOfDate fn for initial migration update checks
- only set maintenance.enabled to true if migration needs to happen
@kirrg001 kirrg001 force-pushed the fix/check-if-migration-update-needs-to-happen branch from 13b8569 to 0414864 Compare July 26, 2016 07:09
@ErisDS ErisDS merged commit 417b9b6 into TryGhost:master Jul 26, 2016
@ErisDS ErisDS mentioned this pull request Jul 26, 2016
5 tasks
chris-brown pushed a commit to chris-brown/Ghost that referenced this pull request Aug 14, 2016
…ryGhost#7129)

refs TryGhost#7125
- create isDatabaseOutOfDate fn for initial migration update checks
- only set maintenance.enabled to true if migration needs to happen
geekhuyang pushed a commit to geekhuyang/Ghost that referenced this pull request Nov 20, 2016
…ryGhost#7129)

refs TryGhost#7125
- create isDatabaseOutOfDate fn for initial migration update checks
- only set maintenance.enabled to true if migration needs to happen
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