close multiple drives at once #2364
totoantibes
started this conversation in
Ideas
Replies: 1 comment 11 replies
-
It's been a long time since I wrote a shell script, but just knocked this one up:
Requires a file called unclosed-drives.sql which contains: I'm sure these should be put into one script, but I've done enough today :) |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have to regularly (and i mean daily) go on teslamate and look for missing drives in grafana, look at the missing ID number from the overlay url and then run the "close drive script" manually for the missing ID. is there by any chance a small script that could run a "for loop" to clean it up? i could cron the script and have a clean up state of trips.... It should not be that difficult but i am not sure what is the query needed to look for the missing trips...
this is what i run manually (as per the docs: https://docs.teslamate.org/docs/maintenance/manually_fixing_data
sudo docker-compose exec teslamate bin/teslamate rpc "TeslaMate.Repo.get!(TeslaMate.Log.Drive,1125) |> TeslaMate.Log.close_drive()"
Beta Was this translation helpful? Give feedback.
All reactions