mirror of
https://github.com/immich-app/immich.git
synced 2025-12-30 09:15:28 +03:00
chore(server): eslint await-thenable (#7545)
* await-thenable * fix library watchers * moar eslint * fix test * fix typo * try to remove check void return * fix checksVoidReturn * move to domain utils * remove eslint ignores * chore: cleanup types * chore: use logger * fix: e2e --------- Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
committed by
GitHub
parent
972d5a3411
commit
5d377e5b0f
@@ -1,6 +1,5 @@
|
||||
import { ImmichLogger } from '@app/infra/logger';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { QueryFailedError } from 'typeorm';
|
||||
import { Version, VersionType } from '../domain.constant';
|
||||
import {
|
||||
DatabaseExtension,
|
||||
@@ -61,7 +60,9 @@ export class DatabaseService {
|
||||
}
|
||||
|
||||
private async createVectorExtension() {
|
||||
await this.databaseRepository.createExtension(this.vectorExt).catch(async (error: QueryFailedError) => {
|
||||
try {
|
||||
await this.databaseRepository.createExtension(this.vectorExt);
|
||||
} catch (error) {
|
||||
const otherExt =
|
||||
this.vectorExt === DatabaseExtension.VECTORS ? DatabaseExtension.VECTOR : DatabaseExtension.VECTORS;
|
||||
this.logger.fatal(`
|
||||
@@ -78,7 +79,7 @@ export class DatabaseService {
|
||||
In this case, you may set either extension now, but you will not be able to switch to the other extension following a successful startup.
|
||||
`);
|
||||
throw error;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private async updateVectorExtension() {
|
||||
|
||||
Reference in New Issue
Block a user