fix(server): reverse geocoding delete dump logic (#2551)

This commit is contained in:
Jason Rasmussen 2023-05-23 21:36:36 -04:00 committed by GitHub
parent 2dc8a93685
commit a1f1e5bc37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -50,14 +50,14 @@ export class MetadataExtractionProcessor {
this.reverseGeocodingEnabled = !configService.get('DISABLE_REVERSE_GEOCODING');
}
async init(skipCache = false) {
async init(deleteCache = false) {
this.logger.warn(`Reverse geocoding is ${this.reverseGeocodingEnabled ? 'enabled' : 'disabled'}`);
if (!this.reverseGeocodingEnabled) {
return;
}
try {
if (!skipCache) {
if (deleteCache) {
await this.geocodingRepository.deleteCache();
}
this.logger.log('Initializing Reverse Geocoding');