0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Skipped unnecessary frontend initialization

refs https://github.com/TryGhost/Toolbox/issues/135

- This optimization is expected to play a role in more consistent "backend-only" boot where the previous test state might have left over a different theme version which might cause in unwanted URL Services reainitializations.
- What has been happening here is the themes.test.js suite was uploading a theme with a v4 api and when the users api test suite loaded up it switched back to a default v2 theme, which caused routing reinitialization
- The root problem here  is the themese suite is leaving a mess behind so a "restartModeGhostStart" is not really possible anymore - this should be cleaned up separately
This commit is contained in:
Naz 2021-11-19 10:58:46 +04:00 committed by naz
parent ae5dd8ad30
commit 9057ca0ee2

View file

@ -109,10 +109,12 @@ const restartModeGhostStart = async ({withFrontend}) => {
await settingsService.init();
debug('settings done');
// Load the frontend-related components
await routeSettingsService.init();
await themeService.init();
debug('frontend done');
if (withFrontend) {
// Load the frontend-related components
await routeSettingsService.init();
await themeService.init();
debug('frontend done');
}
// Reload the URL service & wait for it to be ready again
// @TODO: why/how is this different to urlService.resetGenerators?