Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Match the documented behaviour

Manav Rathi192e491acbe8
diff --git a/web/packages/new/photos/services/ml/worker.ts b/web/packages/new/photos/services/ml/worker.ts
index cbeba5f844..5a3719d983 100644
--- a/web/packages/new/photos/services/ml/worker.ts
+++ b/web/packages/new/photos/services/ml/worker.ts
@@ -292,14 +292,14 @@ const indexNextBatch = async (
for (const item of items) {
try {
await index(item, electron);
- delegate?.workerDidProcessFile();
- // Let us drain the microtask queue. This also gives a chance for other
- // interactive tasks like `clipMatches` to run.
- await wait(0);
} catch (e) {
log.warn(`Skipping unindexable file ${item.enteFile.id}`, e);
allSuccess = false;
}
+ delegate?.workerDidProcessFile();
+ // Let us drain the microtask queue. This also gives a chance for other
+ // interactive tasks like `clipMatches` to run.
+ await wait(0);
}
// Return true if nothing failed.