MCPcopy
hub / github.com/immich-app/immich / init

Method init

server/src/services/metadata.service.ts:162–175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160 }
161
162 private async init() {
163 this.logger.log('Initializing metadata service');
164
165 try {
166 await this.jobRepository.pause(QueueName.MetadataExtraction);
167 await this.databaseRepository.withLock(DatabaseLock.GeodataImport, () => this.mapRepository.init());
168 await this.jobRepository.resume(QueueName.MetadataExtraction);
169
170 this.logger.log(`Initialized local reverse geocoder`);
171 } catch (error: Error | any) {
172 this.logger.error(`Unable to initialize reverse geocoding: ${error}`, error?.stack);
173 throw new Error('Metadata service init failed', { cause: error });
174 }
175 }
176
177 private async linkLivePhotos(
178 asset: { id: string; type: AssetType; ownerId: string; libraryId: string | null },

Callers 3

onBootstrapMethod · 0.95
onModuleInitMethod · 0.45
setupMethod · 0.45

Calls 5

logMethod · 0.80
withLockMethod · 0.80
resumeMethod · 0.80
errorMethod · 0.80
pauseMethod · 0.65

Tested by

no test coverage detected