From d585b75514d8e2a25e076e770ded3f68540cc4af Mon Sep 17 00:00:00 2001 From: laurenspriem Date: Thu, 23 May 2024 14:27:29 +0530 Subject: [PATCH] [mob][photos] Logging --- .../machine_learning/face_ml/face_ml_service.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mobile/lib/services/machine_learning/face_ml/face_ml_service.dart b/mobile/lib/services/machine_learning/face_ml/face_ml_service.dart index 06818856a..b9ccc510e 100644 --- a/mobile/lib/services/machine_learning/face_ml/face_ml_service.dart +++ b/mobile/lib/services/machine_learning/face_ml/face_ml_service.dart @@ -153,8 +153,7 @@ class FaceMlService { "MLController allowed running ML, faces indexing starting", ); } - unawaited(indexAndClusterAll()); - } + unawaited(indexAndClusterAll()); } else { _logger.info( "MLController stopped running ML, faces indexing will be paused (unless it's fetching embeddings)", @@ -511,6 +510,8 @@ class FaceMlService { } } if (!await canUseHighBandwidth()) { + _logger + .info('stopping indexing because user is not connected to wifi'); continue; } final smallerChunks = chunk.chunks(_fileDownloadLimit); @@ -540,8 +541,9 @@ class FaceMlService { stopwatch.stop(); _logger.info( - "`indexAllImages()` finished. Fetched $fetchedCount and analyzed $fileAnalyzedCount images, in ${stopwatch.elapsed.inSeconds} seconds (avg of ${stopwatch.elapsed.inSeconds / fileAnalyzedCount} seconds per image, skipped $fileSkippedCount images. MLController status: $_mlControllerStatus)", + "`indexAllImages()` finished. Fetched $fetchedCount and analyzed $fileAnalyzedCount images, in ${stopwatch.elapsed.inSeconds} seconds (avg of ${stopwatch.elapsed.inSeconds / fileAnalyzedCount} seconds per image, skipped $fileSkippedCount images)", ); + _logStatus(); } catch (e, s) { _logger.severe("indexAllImages failed", e, s); } finally {