Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Small fix in index scheduling

laurenspriem6c3953e85523
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 2aabf7f2b9..165a695ed4 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
@@ -143,13 +143,21 @@ class FaceMlService {
}
_mlControllerStatus = event.shouldRun;
if (_mlControllerStatus) {
+ if (_shouldPauseIndexingAndClustering) {
+ _shouldPauseIndexingAndClustering = false;
+ _logger.info(
+ "MLController allowed running ML, faces indexing undoing previous pause",
+ );
+ } else {
+ _logger.info(
+ "MLController allowed running ML, faces indexing starting",
+ );
+ unawaited(indexAndClusterAll());
+ }
+ } else {
_logger.info(
- "MLController allowed running ML, faces indexing starting (unless it's already fetching embeddings)",
+ "MLController stopped running ML, faces indexing will be paused (unless it's fetching embeddings)",
);
- unawaited(indexAndClusterAll());
- } else {
- _logger
- .info("MLController stopped running ML, faces indexing will be paused (unless it's fetching embeddings)");
pauseIndexingAndClustering();
}
});