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

Removed unnecessary resetGenerators call

no issue

- This extra call doesn't seem to be necessary during a fresh boot. It only adds noise in code!
This commit is contained in:
Naz 2021-11-30 11:37:56 +04:00 committed by naz
parent 21219fff2f
commit 2ed1d5c2cc

View file

@ -168,11 +168,6 @@ const freshModeGhostStart = async (options) => {
await settingsService.init();
// Reset the URL service generators
// @TODO: Prob B: why/how is this different to urlService.reset?
// @TODO: why would we do this on a fresh boot?!
urlService.resetGenerators();
// Actually boot Ghost
await bootGhost(options);
@ -239,6 +234,9 @@ const stopGhost = async () => {
if (ghostServer && ghostServer.httpServer) {
await ghostServer.stop();
delete require.cache[require.resolve('../../core/app')];
// NOTE: similarly to urlService.reset() there doesn't seem to be a need for this call
// probable best location for this type of cleanup if it's needed is registering
// a hood during the "server cleanup" phase of the server stop
urlService.resetGenerators();
}
};