SciLifeLab/scilifelab — pull request #357 by guillermo-carrasco (2014-01-30 08:42:53+00:00)
Title: Automatic cleaning through "pm production storage-cleanup"

Adds functionality for automatic cleanup. It will check different thinks depending on the context:

if running on a NAS:

* Will move to ```nosync``` folder the runs that have finished (RTAComplete.txt present) if ```lsyncd``` is up to speed.
* For the runs already in ```nosync``` folder, if they're older than 30 days, there is no ```no_remove.txt``` file present **and** the value of ```storage_status``` in the flowcell is ```swestore_archived``` in StatusDB, will permanently remove it.

If running on processing servers (b5):

* Will move to ```nosync``` the runs that have finished processing (secon_read_processing_completed.txt present)
* For the runs already in ```nosync``` folder, will remove them if they're older than 30 days and there is no ```no_remove.txt``` file present. In this case doesn't check the database.