mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 09:15:05 +03:00
fix: ack may not exist depending on caller
This commit is contained in:
@@ -37,8 +37,8 @@ export class MaintenanceWebsocketRepository implements OnGatewayConnection, OnGa
|
|||||||
|
|
||||||
afterInit(websocketServer: Server) {
|
afterInit(websocketServer: Server) {
|
||||||
this.logger.log('Initialized websocket server');
|
this.logger.log('Initialized websocket server');
|
||||||
websocketServer.on('AppRestart', (_, ack) => {
|
websocketServer.on('AppRestart', (_, ack?: (ok: 'ok') => void) => {
|
||||||
ack('ok');
|
ack?.('ok');
|
||||||
this.appRepository.exitApp();
|
this.appRepository.exitApp();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ export class MaintenanceService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@OnEvent({ name: 'AppRestart', server: true })
|
@OnEvent({ name: 'AppRestart', server: true })
|
||||||
onRestart(_: undefined, ack: (ok: 'ok') => void): void {
|
onRestart(_: undefined, ack?: (ok: 'ok') => void): void {
|
||||||
ack('ok');
|
ack?.('ok');
|
||||||
this.appRepository.exitApp();
|
this.appRepository.exitApp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user