diff --git a/apps/health_campaign_field_worker_app/pubspec.lock b/apps/health_campaign_field_worker_app/pubspec.lock index c47910a9c..20561c7a7 100644 --- a/apps/health_campaign_field_worker_app/pubspec.lock +++ b/apps/health_campaign_field_worker_app/pubspec.lock @@ -69,10 +69,10 @@ packages: dependency: "direct main" description: name: attendance_management - sha256: f1b4373e8d0d9f8227ede0d25d4141f0d16d18ac2525c0347b844098cdab080f + sha256: "8a09814ca11cca736d771be70fb6174303ea0cb3525aa72e7239cbc14b915303" url: "https://pub.dev" source: hosted - version: "1.0.2+1" + version: "1.0.2+4" audioplayers: dependency: "direct main" description: @@ -502,10 +502,10 @@ packages: dependency: "direct main" description: name: digit_data_model - sha256: "0e5a1f8c5f0548e573af9c0279942f2dbc332042865614e0b89fe5952002ef1f" + sha256: "08f5273e691cc16e0f89aefac97887abb63739b7db3a00165c1be269aacedffd" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.4+1" digit_dss: dependency: "direct main" description: @@ -517,9 +517,10 @@ packages: digit_firebase_services: dependency: "direct main" description: - path: "../../packages/digit_firebase_services" - relative: true - source: path + name: digit_firebase_services + sha256: ce76521d797e123b6fc95c9dfad7d4a918a93b97f57aecd0e1d517b46190909d + url: "https://pub.dev" + source: hosted version: "0.0.1" digit_location_tracker: dependency: "direct main" diff --git a/apps/health_campaign_field_worker_app/pubspec.yaml b/apps/health_campaign_field_worker_app/pubspec.yaml index 06d188a41..28a15c64d 100644 --- a/apps/health_campaign_field_worker_app/pubspec.yaml +++ b/apps/health_campaign_field_worker_app/pubspec.yaml @@ -69,7 +69,7 @@ dependencies: digit_scanner: ^1.0.3+1 inventory_management: ^1.0.3+4 referral_reconciliation: ^1.0.2+2 - digit_data_model: ^1.0.4 + digit_data_model: ^1.0.4+1 registration_delivery: ^1.0.3+2 disable_battery_optimization: ^1.1.1 digit_dss: ^1.0.1 diff --git a/packages/attendance_management/pubspec.lock b/packages/attendance_management/pubspec.lock index 92c10cb88..065d42847 100644 --- a/packages/attendance_management/pubspec.lock +++ b/packages/attendance_management/pubspec.lock @@ -326,10 +326,10 @@ packages: dependency: "direct main" description: name: digit_data_model - sha256: "0b81e96636496b56b4f9c5d918690a17d8985d6b131e0ab54968eb5471ee4f54" + sha256: "0e5a1f8c5f0548e573af9c0279942f2dbc332042865614e0b89fe5952002ef1f" url: "https://pub.dev" source: hosted - version: "1.0.3+1" + version: "1.0.4" dio: dependency: "direct main" description: diff --git a/packages/digit_data_model/CHANGELOG.md b/packages/digit_data_model/CHANGELOG.md index a297e7930..f433699dd 100644 --- a/packages/digit_data_model/CHANGELOG.md +++ b/packages/digit_data_model/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.0.4+1 + +* Bug Fix: + * Updated syncRetryCount,syncRetryInterval and errorPath to dynamic + ## 1.0.4 * Added user_action entity for digit_location_tracker package diff --git a/packages/digit_data_model/lib/data/data_repository.dart b/packages/digit_data_model/lib/data/data_repository.dart index 6561840fd..869831b1f 100644 --- a/packages/digit_data_model/lib/data/data_repository.dart +++ b/packages/digit_data_model/lib/data/data_repository.dart @@ -297,7 +297,7 @@ abstract class RemoteRepository { .syncedDownEqualTo(false) .nonRecoverableErrorEqualTo(false) .syncDownRetryCountGreaterThan( - 5 - 1, + DigitDataModelSingleton().syncDownRetryCount - 1, ) .createdByEqualTo(createdBy) .findAllSync(); @@ -112,7 +112,8 @@ abstract class OpLogManager { var oplogs = isar.opLogs .filter() .syncedUpEqualTo(true) - .syncDownRetryCountLessThan(5) + .syncDownRetryCountLessThan( + DigitDataModelSingleton().syncDownRetryCount) .syncedDownEqualTo(false) .entityTypeEqualTo(type) .findAllSync(); @@ -299,7 +300,8 @@ abstract class OpLogManager { OpLogEntry updatedEntry = entry.copyWith( syncDownRetryCount: syncDownRetryCount + 1, ); - if (updatedEntry.syncDownRetryCount >= 5) { + if (updatedEntry.syncDownRetryCount >= + DigitDataModelSingleton().syncDownRetryCount) { markAsNonRecoverable = true; updatedEntry = updatedEntry.copyWith(nonRecoverableError: true); } @@ -315,7 +317,8 @@ abstract class OpLogManager { await Future.delayed(const Duration(seconds: 1)); } else { await Future.delayed(Duration( - seconds: 5 * oplogs.first.syncDownRetryCount, + seconds: DigitDataModelSingleton().retryTimeInterval * + oplogs.first.syncDownRetryCount, )); } diff --git a/packages/digit_data_model/pubspec.yaml b/packages/digit_data_model/pubspec.yaml index fd69a0da9..578521884 100644 --- a/packages/digit_data_model/pubspec.yaml +++ b/packages/digit_data_model/pubspec.yaml @@ -1,6 +1,6 @@ name: digit_data_model description: The digit_data_model package is a data modeling library. It defines various classes, enums, and functions. -version: 1.0.4 +version: 1.0.4+1 homepage: https://github.com/egovernments/health-campaign-field-worker-app/tree/master/packages/digit_data_model repository: https://github.com/egovernments/health-campaign-field-worker-app