Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

fix(storage): guard worker pool and metadata lookups against errors

Timothy Yin4b5d16a51984
diff --git a/server/services/settings/settingsManager.ts b/server/services/settings/settingsManager.ts
index 3067edcc..a9c6f2ae 100644
--- a/server/services/settings/settingsManager.ts
+++ b/server/services/settings/settingsManager.ts
@@ -308,7 +308,14 @@ export class SettingsManager {
key === 'queue.workerCount' &&
!this.isInitializing
) {
- await globalThis.__workerPool?.setWorkerCount(value as number)
+ void globalThis.__workerPool
+ ?.setWorkerCount(value as number)
+ .catch((error) => {
+ this._logger.error(
+ 'Failed to apply queue concurrency setting:',
+ error,
+ )
+ })
}
// Trigger storage provider switch if storage:provider is being changed
diff --git a/server/services/storage/providers/openlist.ts b/server/services/storage/providers/openlist.ts
index 94877d78..4d9479a7 100644
--- a/server/services/storage/providers/openlist.ts
+++ b/server/services/storage/providers/openlist.ts
@@ -114,7 +114,10 @@ export class OpenListStorageProvider implements StorageProvider {
rootPath: this.normalizedRoot(),
})
- const meta = await this.getFileMeta(rootedKey)
+ const meta = await this.getFileMeta(rootedKey).catch((error) => {
+ this.logger?.warn('Uploaded object metadata lookup failed:', error)
+ return null
+ })
return (
meta || {
key: rootedKey,