Browse Source

update tables ignoring missed items

Fares 10 months ago
parent
commit
b4f33d331f
2 changed files with 17 additions and 16 deletions
  1. 1 1
      docker-compose.yml
  2. 16 15
      lib/handlers/file_upload_api.dart

+ 1 - 1
docker-compose.yml

@@ -11,7 +11,7 @@ services:
     restart: unless-stopped
     restart: unless-stopped
     healthcheck:
     healthcheck:
       test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/health"]
       test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/health"]
-      interval: 30s
+      interval: 300s
       timeout: 10s
       timeout: 10s
       retries: 3
       retries: 3
       start_period: 10s
       start_period: 10s

+ 16 - 15
lib/handlers/file_upload_api.dart

@@ -411,21 +411,22 @@ class FileProcess {
         indexToMaintain.add(i);
         indexToMaintain.add(i);
         mapsToInsert.removeAt(index);
         mapsToInsert.removeAt(index);
       } else {
       } else {
-        final mawjoudin = oldComparable.fold(<Map<String, dynamic>>[], (t, e) {
-          return t..add(filterMapByKeys(e, keys2check));
-        });
-
-        final mawjood = mawjoudin
-            .firstWhere((e) => mapEquals(filterMapByKeys(item, keys2check), e),
-                orElse: () => {})
-            .keys
-            .isNotEmpty;
-
-        if (mawjood) {
-          indexToRemove.add(i);
-        } else {
-          print("saved item: $item");
-        }
+        // final mawjoudin = oldComparable.fold(<Map<String, dynamic>>[], (t, e) {
+        //   return t..add(filterMapByKeys(e, keys2check));
+        // });
+
+        // final mawjood = mawjoudin
+        //     .firstWhere((e) => mapEquals(filterMapByKeys(item, keys2check), e),
+        //         orElse: () => {})
+        //     .keys
+        //     .isNotEmpty;
+
+        // if (mawjood) {
+        //   indexToRemove.add(i);
+        // } else {
+        //   print("saved item: $item");
+        // }
+        indexToRemove.add(i);
       }
       }
     }
     }