c3-time-domain / SeeChange

A time-domain data reduction pipeline (e.g., for handling images->lightcurves) for surveys like DECam and LS4
BSD 3-Clause "New" or "Revised" License
0 stars 4 forks source link

Add a __del__ method to FileOnDiskMixin #233

Closed guynir42 closed 3 months ago

guynir42 commented 3 months ago

This cleans up un-committed files (if they don't have a primary key id set). This prevents orphan files of objects that were created and for some reason saved to disk / archive, but were never persisted.

With this we can also remove the ImageAlignment.temp_images list that was used to help prevent build up of temporary aligned images and their associated files.

guynir42 commented 3 months ago

This doesn't seem to work, since the __del__ gets called as soon as you merge an object and throw away its reference in favor of the new object. I will need to come up with a new idea.