mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00:00
fix(server): don't assume maintenance action is set (#25622)
This commit is contained in:
parent
9be01e79f7
commit
913e939606
2 changed files with 6 additions and 3 deletions
|
|
@ -79,7 +79,7 @@ export class MaintenanceWorkerService {
|
||||||
this.#secret = state.secret;
|
this.#secret = state.secret;
|
||||||
this.#status = {
|
this.#status = {
|
||||||
active: true,
|
active: true,
|
||||||
action: state.action.action,
|
action: state.action?.action ?? MaintenanceAction.Start,
|
||||||
};
|
};
|
||||||
|
|
||||||
StorageCore.setMediaLocation(this.detectMediaLocation());
|
StorageCore.setMediaLocation(this.detectMediaLocation());
|
||||||
|
|
@ -88,7 +88,10 @@ export class MaintenanceWorkerService {
|
||||||
this.maintenanceWebsocketRepository.setStatusUpdateFn((status) => (this.#status = status));
|
this.maintenanceWebsocketRepository.setStatusUpdateFn((status) => (this.#status = status));
|
||||||
|
|
||||||
await this.logSecret();
|
await this.logSecret();
|
||||||
void this.runAction(state.action);
|
|
||||||
|
if (state.action) {
|
||||||
|
void this.runAction(state.action);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -490,7 +490,7 @@ export interface MemoryData {
|
||||||
export type VersionCheckMetadata = { checkedAt: string; releaseVersion: string };
|
export type VersionCheckMetadata = { checkedAt: string; releaseVersion: string };
|
||||||
export type SystemFlags = { mountChecks: Record<StorageFolder, boolean> };
|
export type SystemFlags = { mountChecks: Record<StorageFolder, boolean> };
|
||||||
export type MaintenanceModeState =
|
export type MaintenanceModeState =
|
||||||
| { isMaintenanceMode: true; secret: string; action: SetMaintenanceModeDto }
|
| { isMaintenanceMode: true; secret: string; action?: SetMaintenanceModeDto }
|
||||||
| { isMaintenanceMode: false };
|
| { isMaintenanceMode: false };
|
||||||
export type MemoriesState = {
|
export type MemoriesState = {
|
||||||
/** memories have already been created through this date */
|
/** memories have already been created through this date */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue