opensrp / opensrp-client-path

Other
6 stars 6 forks source link

Investigate if long sync intervals are triggered #326

Open keymane opened 6 years ago

keymane commented 6 years ago

Related to https://github.com/OpenSRP/opensrp-client-path/issues/250

Investigate whether long sync intervals - 30 minutes or more - are triggered, especially after device is inactive

keymane commented 6 years ago

@paulnindi the long sync intervals were not being triggered if the device is logged out. I've added functionality to enable this and to wake up the device when the long sync intervals are triggered

cafootitt commented 6 years ago

@keymane Can you explain this issue to me? How can a long sync interval be triggered? Can you give an example?

keymane commented 6 years ago

Some of the sync intervals are too long and may not be triggered if the device sleeps after some time of inactivity. In ZEIR the application is logged out when the device becomes inactive so for example, Pull unique IDs which should run every 3 hours may not run.

We've added a fix where the alarm manager (trigger functionality) wakes the device up, and performs the sync task even when the application is logged out.

cafootitt commented 6 years ago

Ok great, makes sense.