()
| 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 }, |
no test coverage detected