refactor: use before shutdown hook name

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2024-12-03 14:44:40 +01:00
parent 5171d5c742
commit 255e829be2
5 changed files with 20 additions and 18 deletions
@@ -452,7 +452,7 @@ export class BackendInitializer {
const rootLifecycleService = await this.#getRootLifecycleImpl();
// Root services like the health one need to immediatelly be notified of the shutdown
await rootLifecycleService.preShutdown();
await rootLifecycleService.beforeShutdown();
// Get all plugins.
const allPlugins = new Set<string>();
@@ -480,7 +480,7 @@ export class BackendInitializer {
async #getRootLifecycleImpl(): Promise<
RootLifecycleService & {
startup(): Promise<void>;
preShutdown(): Promise<void>;
beforeShutdown(): Promise<void>;
shutdown(): Promise<void>;
}
> {