ecotaxa / ecotaxa_front

Front end of the EcoTaxa application
Other
6 stars 6 forks source link

Orphan transferred files accumulate in /tmp #838

Closed grololo06 closed 7 months ago

grololo06 commented 2 years ago

Linked with #832

When a user picks the "Upload folder(s) compressed as a zip file" option, the file is first transferred into a randomly named directory of /tmp

When the corresponding job is cleaned, the temporary directory remains. E.g. now

The plan was that, instead of the simple upload button, users could have a set of recently used files to pick from when importing, so e.g. in case of data conflict during import, they would be able to pick again the same file, without the need to re-upload as today.

For now, it would be possible to add in nightly job the function "remove /tmp entries of nonexistent jobs", e.g.: {"prj_id": 6590, "req": {"source_path": "/tmp/tmpoguhcoma.1694/sp061421_sta_wh_x_x_a_1 - Copy.zip", "taxo_mappings": {}, "skip_loaded_files": true, "skip_existing_objects": false, "update_mode": ""}}

Another option would be to restart the back-end time-to-time, which would be beneficial from other aspects.