Open fpurcell opened 5 years ago
pretty sure this one is fixed.
I don't think this was implemented in OTP.
reopen then...
Tempted to close due to car2go going away...but maybe applies to GBFS data for bikes/e-scooters...
Definitely applies. I'll try to remember this in the next round of work on vehicle rentals in OTP.
WANT: in the OTP code, I want the data loaders to have an optional setting for time-to-live (TTL) of said dataset being loaded. For example, the car2go loader in OTP would be given a TTL of 300 seconds by me in the config. OTP would then check load dates on any requested updates to the date...where there exists car2go data that was loaded into OTP before the TTL time, that data will be expunged from OTP.
BACKSTORY: as of May 29th, we've not been getting any car2go updates due to an expired api auth certificate. But OTP has retained a snapshot of the car2go data that was last loaded ~3 days ago. This is kinda problematic, in that we're showing old bogus data.
FUTURE with TTL: with the new TTL parameter and cleanup code in place, when the loader asks for car2go data it will also expunge old data from memory. And even if the car2go loader gets no data back from the source (because the cert expired, or there was a network problem, or whatever), the car2go loader (and other dynamic data loaders) will perform a step that guarantees that we won't be showing out-of-date information.