TheTransitClock / transitime

TheTransitClock real-time transit information system
GNU General Public License v3.0
78 stars 29 forks source link

Delete ids of out-of-date vehicles #277

Open TsimurSh opened 6 months ago

TsimurSh commented 6 months ago

Hi,

I have situations when I would like to remove outdated IDs of vehicles that have not been used by the carrier for some time. In such a scenario when specific vehicleid has been deleted from all db TC tables and from Traccar, but the endpoint "vehicleDetails" still returns vehicles containing the deleted id. Is this preserved in the cache? How can I permanently get rid of these ids?

Thank you for bringing this to your attention.

scrudden commented 6 months ago

If you restart are these vehicles available at the vehicleDetails endpoint?

wkulesza commented 6 months ago

We're running this in docker. So if we run: docker stop transitclock docker rm transitclock docker rmi transitclock-server docker build --no-cache -t transitclock-server\ --build-arg TRANSITCLOCK_PROPERTIES="config/transitclock.properties" \ --build-arg AGENCYID="id" \ --build-arg AGENCYNAME="name" \ --build-arg GTFS_URL="gtfs-url-here" . docker run --name transitclock --rm --link transitclock-db:postgres -e PGPASSWORD=$PGPASSWORD -v /mnt/logs/:/usr/local/transitclock/logs/ -v /mnt/ehcache:/usr/local/transitclock/cache/ -p 8080:8443 transitclock-server start_transitclock.sh

they should dissapear. But we would prefer to add a method and endpoint clearCache - could you identify where this bit in code? We identified this collection or massive VehicleDataCache here ?