-
Notifications
You must be signed in to change notification settings - Fork 3
Warning System #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning System #167
Conversation
| : Promise<RemotePlace[]> { | ||
| const domainStore = await RemotePlaceCache.getDomainStore(chtApi, contactType, hierarchyLevel); | ||
| return domainStore; | ||
| public static async getRemotePlaces(chtApi: ChtApi, contactType: ContactType, atHierarchyLevel?: HierarchyConstraint): Promise<RemotePlace[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this a really expensive call in this context? also if i'm not mistaken, doesn't the cache immediately get stale after a successful upload?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well it should load from cache most of the time. the cache is only refreshed when users click refresh or after Ro's PR to add time expiry.
the cache is updated during upload (not by requesting data from the server again), but just by adding new places into the cache as they are created
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been bit by this in #227, this should be the case for any high frequency contact type
|
@freddieptf This is ready for review again whenever you're back from holiday. I have merged, updated, and tested. |
freddieptf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
#20
Note this is based on #161
Warning System:
uniqueattribute on theContactPropertiesin config. These properties can be onplace_propertiesorcontact_properties.uniqueattributes are set on place_properties, they actually verify the true uniqueness of the data by checking it against production data on the instance. Whenuniqueattributes are set on contact_properties, they verify only the uniqueness of the data within the current batch of loaded jobs. This was done for performance reasons to avoid downloading and managing the cache of thousands ofpersoncontacts.Here is how warnings appear to the user:

Other Stuff:
RemotePlaceCacheto fetch and cache all needed information in parallel and to store only the needed information required to ensure uniqueness