mirror of
https://github.com/ente-io/ente.git
synced 2025-08-07 15:09:09 +00:00
[mob][photos] Fix ml not stopping on interaction
This commit is contained in:
parent
eaf136d34f
commit
1d50cdeeca
@ -165,12 +165,13 @@ class MLService {
|
||||
int fileAnalyzedCount = 0;
|
||||
final Stopwatch stopwatch = Stopwatch()..start();
|
||||
|
||||
stream:
|
||||
await for (final chunk in instructionStream) {
|
||||
if (!await canUseHighBandwidth()) {
|
||||
_logger.info(
|
||||
'stopping indexing because user is not connected to wifi',
|
||||
);
|
||||
break;
|
||||
break stream;
|
||||
} else {
|
||||
await _ensureDownloadedModels();
|
||||
}
|
||||
@ -178,7 +179,7 @@ class MLService {
|
||||
for (final instruction in chunk) {
|
||||
if (_shouldPauseIndexingAndClustering) {
|
||||
_logger.info("indexAllImages() was paused, stopping");
|
||||
break;
|
||||
break stream;
|
||||
}
|
||||
await _ensureLoadedModels(instruction);
|
||||
futures.add(processImage(instruction));
|
||||
|
Loading…
x
Reference in New Issue
Block a user