[mob][photos] Fetch remote feedback before clustering (#1888)
## Description See title
This commit is contained in:
commit
05579ef368
3 changed files with 6 additions and 3 deletions
|
@ -580,6 +580,9 @@ class FaceMlService {
|
|||
_isIndexingOrClusteringRunning = true;
|
||||
final clusterAllImagesTime = DateTime.now();
|
||||
|
||||
_logger.info('Pulling remote feedback before actually clustering');
|
||||
await PersonService.instance.fetchRemoteClusterFeedback();
|
||||
|
||||
try {
|
||||
// Get a sense of the total number of faces in the database
|
||||
final int totalFaces = await FaceMLDataDB.instance
|
||||
|
|
|
@ -73,7 +73,7 @@ class PersonService {
|
|||
Future<void> reconcileClusters() async {
|
||||
final EnteWatch? w = kDebugMode ? EnteWatch("reconcileClusters") : null;
|
||||
w?.start();
|
||||
await storeRemoteFeedback();
|
||||
await fetchRemoteClusterFeedback();
|
||||
w?.log("Stored remote feedback");
|
||||
final dbPersonClusterInfo =
|
||||
await faceMLDataDB.getPersonToClusterIdToFaceIds();
|
||||
|
@ -225,7 +225,7 @@ class PersonService {
|
|||
Bus.instance.fire(PeopleChangedEvent());
|
||||
}
|
||||
|
||||
Future<void> storeRemoteFeedback() async {
|
||||
Future<void> fetchRemoteClusterFeedback() async {
|
||||
await entityService.syncEntities();
|
||||
final entities = await entityService.getEntities(EntityType.person);
|
||||
entities.sort((a, b) => a.updatedAt.compareTo(b.updatedAt));
|
||||
|
|
|
@ -193,7 +193,7 @@ class _FaceDebugSectionWidgetState extends State<FaceDebugSectionWidget> {
|
|||
trailingIconIsMuted: true,
|
||||
onTap: () async {
|
||||
try {
|
||||
await PersonService.instance.storeRemoteFeedback();
|
||||
await PersonService.instance.fetchRemoteClusterFeedback();
|
||||
FaceMlService.instance.debugIndexingDisabled = false;
|
||||
await FaceMlService.instance
|
||||
.clusterAllImages(clusterInBuckets: true);
|
||||
|
|
Loading…
Add table
Reference in a new issue