fix(server,cli): don't float promises (#4433)

* fix: don't allow floating promises

* fix: await all promises

* fix: download archives

* fix cli tests

* fix: skip web
This commit is contained in:
Jonathan Jogenfors 2023-10-13 07:22:40 +02:00 committed by GitHub
parent 7e9fc4aa97
commit f0bb50b61a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 41 additions and 43 deletions

View file

@ -90,14 +90,14 @@ export class AppService {
[JobName.LIBRARY_QUEUE_CLEANUP]: () => this.libraryService.handleQueueCleanup(),
});
process.on('uncaughtException', (error: Error | any) => {
process.on('uncaughtException', async (error: Error | any) => {
const isCsvError = error.code === 'CSV_RECORD_INCONSISTENT_FIELDS_LENGTH';
if (!isCsvError) {
throw error;
}
this.logger.warn('Geocoding csv parse error, trying again without cache...');
this.metadataService.init(true);
await this.metadataService.init(true);
});
await this.metadataService.init();