mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
fix: cache build versions (#17811)
This commit is contained in:
parent
987e5ab76c
commit
19746a8685
@ -73,7 +73,10 @@ export class ServerInfoRepository {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildVersions?: ServerBuildVersions;
|
||||||
|
|
||||||
async getBuildVersions(): Promise<ServerBuildVersions> {
|
async getBuildVersions(): Promise<ServerBuildVersions> {
|
||||||
|
if (!this.buildVersions) {
|
||||||
const { nodeVersion, resourcePaths } = this.configRepository.getEnv();
|
const { nodeVersion, resourcePaths } = this.configRepository.getEnv();
|
||||||
|
|
||||||
const [nodejsOutput, ffmpegOutput, magickOutput] = await Promise.all([
|
const [nodejsOutput, ffmpegOutput, magickOutput] = await Promise.all([
|
||||||
@ -86,7 +89,7 @@ export class ServerInfoRepository {
|
|||||||
.then((buffer) => JSON.parse(buffer.toString()))
|
.then((buffer) => JSON.parse(buffer.toString()))
|
||||||
.catch(() => this.logger.warn(`Failed to read ${resourcePaths.lockFile}`));
|
.catch(() => this.logger.warn(`Failed to read ${resourcePaths.lockFile}`));
|
||||||
|
|
||||||
return {
|
this.buildVersions = {
|
||||||
nodejs: nodejsOutput || nodeVersion || '',
|
nodejs: nodejsOutput || nodeVersion || '',
|
||||||
exiftool: await exiftool.version(),
|
exiftool: await exiftool.version(),
|
||||||
ffmpeg: getLockfileVersion('ffmpeg', lockfile) || ffmpegOutput.replaceAll('ffmpeg version', '') || '',
|
ffmpeg: getLockfileVersion('ffmpeg', lockfile) || ffmpegOutput.replaceAll('ffmpeg version', '') || '',
|
||||||
@ -95,4 +98,7 @@ export class ServerInfoRepository {
|
|||||||
getLockfileVersion('imagemagick', lockfile) || magickOutput.replaceAll('Version: ImageMagick ', '') || '',
|
getLockfileVersion('imagemagick', lockfile) || magickOutput.replaceAll('Version: ImageMagick ', '') || '',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return this.buildVersions;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user