fix(reindex): query problem

This commit is contained in:
무라쿠모 2024-09-06 17:39:32 +09:00
parent f01e03eedb
commit ba95b99abc
No known key found for this signature in database
GPG key ID: 139D6573F92DA9F7

View file

@ -36,9 +36,10 @@ export class ReindexNotesProcessorService {
this.logger.info('Removed all indexes from search engine.');
this.logger.info('Indexing all notes to search engine...');
const lastNote = await this.notesRepository.findOneOrFail({
const lastNote = (await this.notesRepository.find({
order: { id: 'DESC' },
});
take: 1,
}))[0];
let indexedCount = 0;
let cursor: MiNote['id'] | null = null;