trigger treatments sync every 5 minutes in follower mode
by setting UserDefaults.standard.nightScoutSyncTreatmentsRequired = true a treatments sync is triggered This is now done when initiating download of readings. Download of new readings and sync of treatments is done simultaneously
This commit is contained in:
parent
43cb5fa019
commit
648dcfa28e
|
@ -145,6 +145,9 @@ class NightScoutFollowManager:NSObject {
|
||||||
|
|
||||||
trace("in download", log: self.log, category: ConstantsLog.categoryNightScoutFollowManager, type: .info)
|
trace("in download", log: self.log, category: ConstantsLog.categoryNightScoutFollowManager, type: .info)
|
||||||
|
|
||||||
|
trace(" setting nightScoutSyncTreatmentsRequired to true, this will also initiate a treatments sync", log: self.log, category: ConstantsLog.categoryNightScoutFollowManager, type: .info)
|
||||||
|
UserDefaults.standard.nightScoutSyncTreatmentsRequired = true
|
||||||
|
|
||||||
// nightscout URl must be non-nil - could be that url is not valid, this is not checked here, the app will just retry every x minutes
|
// nightscout URl must be non-nil - could be that url is not valid, this is not checked here, the app will just retry every x minutes
|
||||||
guard let nightScoutUrl = UserDefaults.standard.nightScoutUrl else {return}
|
guard let nightScoutUrl = UserDefaults.standard.nightScoutUrl else {return}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue