-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into flavor-nigeria-dcis
- Loading branch information
Showing
4 changed files
with
89 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 2 additions & 15 deletions
17
opensrp-chw/src/main/java/org/smartregister/chw/sync/ChwSyncIntentService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,16 @@ | ||
package org.smartregister.chw.sync; | ||
|
||
import org.smartregister.chw.dao.EventDao; | ||
import org.smartregister.sync.intent.SyncIntentService; | ||
|
||
public class ChwSyncIntentService extends SyncIntentService { | ||
|
||
@Override | ||
protected void handleSync() { | ||
// fetch the last downloaded serverVersion before any unsyced data | ||
Long serverVersion = EventDao.getMinimumVerifiedServerVersion(); | ||
if (serverVersion != null) | ||
org.smartregister.util.Utils.getAllSharedPreferences().saveLastSyncDate(serverVersion); | ||
|
||
// flag all contentious events as unsynced | ||
EventDao.markEventsForReUpload(); | ||
super.handleSync(); | ||
} | ||
|
||
@Override | ||
public int getEventPullLimit() { | ||
return 1000; | ||
} | ||
|
||
@Override | ||
protected Integer getEventBatchSize(){ | ||
return 250; | ||
} | ||
return 50; | ||
} // Should this be configurable? | ||
} |
4 changes: 4 additions & 0 deletions
4
opensrp-chw/src/togo/java/org/smartregister/chw/application/ChwApplicationFlv.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
package org.smartregister.chw.application; | ||
|
||
public class ChwApplicationFlv extends DefaultChwApplicationFlv { | ||
@Override | ||
public boolean showChildrenUnderFiveAndGirlsAgeNineToEleven() { | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters