dieterich-lab / scimodom

Sci- ModoM: A quantitative database of transcriptome-wide high-throughput RNA modification sites
https://dieterich-lab.github.io/scimodom/
GNU Affero General Public License v3.0
0 stars 0 forks source link

tmp data management #47

Closed eboileau closed 4 months ago

eboileau commented 10 months ago

Aims/objectives.

We need a general solution, e.g. files associated with a given session/user.

A clear and concise description of todo items.

eboileau commented 6 months ago

Check https://daler.github.io/pybedtools/topical-design-principles.html#principle-1-temporary-files-are-created-and-deleted-automatically and https://daler.github.io/pybedtools/autodoc_source.html#pybedtools-setup-and-config

HaraldWilhelmi commented 6 months ago

Had a deeper look at pybedtools:

Using pybedtools.helpers.set_tempdir to have per-request tempdirs will most likely not work - at least if we handle any requests asynchronously. So the most reasonable thing is a housekeeping cron job that does something like:

find /tmp -name 'pybedtools.*.tmp' -mtime +0.1 -exec rm -rf {} \;
eboileau commented 4 months ago

As discussed:

tmp upload management

pybedtools tmp file management

Mostly happens when a user uses the Compare view, but also when creating dataset. In general, the simplest solution here is to let pybedtools do it's job, and we just add a "clean up" on top e.g. delete files that have not been accessed for more than 1 day.

For general info, see

eboileau commented 4 months ago

Latest changes to be tested on the server.