From 192e491acbe8ca81cf3fdefd2aaf2bbdf2556b8b Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Wed, 31 Jul 2024 12:46:02 +0530 Subject: [PATCH] Match the documented behaviour --- web/packages/new/photos/services/ml/worker.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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.