-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Location Validation Timestamp Cache (#938)
* Wifi heartbeat will discard location validation timestamp > 24 hours location_validation_timestamps are only valid within a 24 hour window of the time the heartbeat was received. * Protect LocationCache - rename cache methods to be more like cache methods. - validation timestamps that are in the past will not be cached. - validation timestamps older than 24 hours from the heartbeat will not be returned from the database. - cached locations that are older than 24 hours from the current hearbeat requesting a value will not be returned even if they still have a valid TTL. * (WIP) Fix integration tests for updated LocationCache - location validation timestamps must be within the last 24 hours. - LocationCache will only respect the 12 hour time limit when it's fresh. * pin production version of postgres for tests * something is always being cached reflect this in the name * Fix test inputs The initial heartbeat has a validation timestamp that is just barely valid, so when the second heartbeat comes through over 24 hours past the validation timestamp, it will correctly not consider it. * formatting * correct comment * make sure test timestamps and DB timestamps have the same granularity for comparing truncate to nanoseconds, some postgres DB version only store seconds up to 5 decimal places. * printing for debug CI * truncate to 6 decimal places * remove debug printing
- Loading branch information
1 parent
a45edef
commit bcac912
Showing
5 changed files
with
301 additions
and
54 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
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
Oops, something went wrong.