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

Best way to refresh the database if images removed #1244

Closed
smokedsalmonbagel opened this issue May 1, 2024 · 3 comments
Closed

Best way to refresh the database if images removed #1244

smokedsalmonbagel opened this issue May 1, 2024 · 3 comments

Comments

@smokedsalmonbagel
Copy link

I am syncing detection images to an archival server and want to remove the old media after a certain number of days. I couldn't find a way to remove old images in indie-allsky. If I remove the files do they ever get removed from the database? Is there a procedure for checking for deleted files and removing them?

@aaronwmorris
Copy link
Owner

If you manually delete files, you can use the Validate DB option under System -> Utilities to clean up orphaned database database entries.

@smokedsalmonbagel
Copy link
Author

Thanks. Exactly what I was looking for. I invoked this with the following:

cd ~/indi-allsky/virtualenv/indi-allsky
source bin/activate
python3 ~/indi-allsky/misc/validate_db_entries.py -y

To run this from a script I added a -y option:

https://gist.github.com/smokedsalmonbagel/93d11adf1d3e94c5745e3ffd9733866f

@aaronwmorris
Copy link
Owner

Yep, that script performs the same exact function. I just did not mention it for the sake of simplicity.

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

2 participants