mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 01:11:16 +03:00
chore(maintenance): validate app restart responses
This commit is contained in:
@@ -19,7 +19,10 @@ export async function sendOneShotAppRestart(state: AppRestartEvent): Promise<voi
|
|||||||
|
|
||||||
// => corresponds to notification.service.ts#onAppRestart
|
// => corresponds to notification.service.ts#onAppRestart
|
||||||
server.emit('AppRestartV1', state, async () => {
|
server.emit('AppRestartV1', state, async () => {
|
||||||
await server.serverSideEmitWithAck('AppRestart', state);
|
const responses = await server.serverSideEmitWithAck('AppRestart', state);
|
||||||
|
if (responses.some((response) => response !== 'ok')) {
|
||||||
|
throw new Error("One or more node(s) returned a non-'ok' response to our restart request!");
|
||||||
|
}
|
||||||
|
|
||||||
pubClient.disconnect();
|
pubClient.disconnect();
|
||||||
subClient.disconnect();
|
subClient.disconnect();
|
||||||
|
|||||||
Reference in New Issue
Block a user