Skip to content
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

Delete ids of out-of-date vehicles #277

Open
TsimurSh opened this issue Jan 19, 2024 · 2 comments
Open

Delete ids of out-of-date vehicles #277

TsimurSh opened this issue Jan 19, 2024 · 2 comments

Comments

@TsimurSh
Copy link

TsimurSh commented Jan 19, 2024

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
Copy link
Member

scrudden commented Jan 19, 2024

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

@wkulesza
Copy link

wkulesza commented Jan 19, 2024

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants