[mob][photos] Small fix in index scheduling
This commit is contained in:
parent
d477b55071
commit
6c3953e855
1 changed files with 14 additions and 6 deletions
|
@ -143,13 +143,21 @@ class FaceMlService {
|
|||
}
|
||||
_mlControllerStatus = event.shouldRun;
|
||||
if (_mlControllerStatus) {
|
||||
_logger.info(
|
||||
"MLController allowed running ML, faces indexing starting (unless it's already fetching embeddings)",
|
||||
);
|
||||
unawaited(indexAndClusterAll());
|
||||
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 stopped running ML, faces indexing will be paused (unless it's fetching embeddings)");
|
||||
_logger.info(
|
||||
"MLController stopped running ML, faces indexing will be paused (unless it's fetching embeddings)",
|
||||
);
|
||||
pauseIndexingAndClustering();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue