Skip to content

Commit

Permalink
perf: optimize search sync
Browse files Browse the repository at this point in the history
  • Loading branch information
mdwitr0 committed Apr 3, 2024
1 parent ce0f982 commit 41e38c3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/search-sync/search-sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ export class SearchSyncService {
private readonly movieService: MovieService,
private readonly personService: PersonService,
) {
this.searchSyncModel.deleteMany({});
this.syncMovies();
this.syncPersons();
// this.syncPersons();
}

private async syncData<Entity>(entityType: EntityTypes, items: Entity[], pageIndex: number): Promise<void> {
Expand Down Expand Up @@ -107,7 +108,7 @@ export class SearchSyncService {
async syncMovies() {
this.logger.log('Starting sync for movies');
await this.syncEntity<Movie>(MOVIE_V1_4_INDEX, this.movieService, 10000);
await this.syncEntity<Movie>(MOVIE_INDEX, this.movieService, 10000);
// await this.syncEntity<Movie>(MOVIE_INDEX, this.movieService, 10000);
this.logger.log('Finished sync for movies');
}

Expand Down

0 comments on commit 41e38c3

Please sign in to comment.