mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
fix: import assets on new install (#2044)
This commit is contained in:
@@ -148,12 +148,11 @@ export class SearchService {
|
||||
|
||||
const chunkSize = 1000;
|
||||
for (let i = 0; i < assets.length; i += chunkSize) {
|
||||
const end = i + chunkSize;
|
||||
const chunk = assets.slice(i, end);
|
||||
const done = end >= assets.length - 1;
|
||||
await this.searchRepository.importAssets(chunk, done);
|
||||
await this.searchRepository.importAssets(assets.slice(i, i + chunkSize), false);
|
||||
}
|
||||
|
||||
await this.searchRepository.importAssets([], true);
|
||||
|
||||
this.logger.debug('Finished re-indexing all assets');
|
||||
} catch (error: any) {
|
||||
this.logger.error(`Unable to index all assets`, error?.stack);
|
||||
|
||||
Reference in New Issue
Block a user