[mob] move fetching related code inside fetching block

This commit is contained in:
laurenspriem 2024-04-12 17:46:12 +05:30
parent 2cb08569c9
commit d65264e8e8

View file

@ -557,13 +557,14 @@ class FaceMlService {
outerLoop:
for (final chunk in chunks) {
final futures = <Future<bool>>[];
final List<int> fileIds = [];
// Try to find embeddings on the remote server
for (final f in chunk) {
fileIds.add(f.uploadedFileID!);
}
if (LocalSettings.instance.remoteFetchEnabled) {
try {
final List<int> fileIds = [];
// Try to find embeddings on the remote server
for (final f in chunk) {
fileIds.add(f.uploadedFileID!);
}
final EnteWatch? w = kDebugMode ? EnteWatch("face_em_fetch") : null;
w?.start();
w?.log('starting remote fetch for ${fileIds.length} files');