Skip to content

Calibration and image annihilation

Daniel Nemergut requested to merge ws1353-annihilator_images_cleanup into main

This refactors the Annihilator class and splits it into a bunch of subclasses where each subclass defines:

  • Area to clean (e.g. spool, cache)
  • Workflow to clean (if applicable)
  • Max age to keep
  • Whether or not to flag the workflow as cleaned
  • How to get a list of stale directories (e.g. from workflow server, all directories, from db query)

The script was beginning to be split into a lot of conditionals all over the place so I thought I would make the "annihilate" logic not care about everything outside of its list of directories to clean.

Oh and this adds annihilation for calibrations and images (and the images' corresponding calibrations). Calibrations will be cleaned if they aren't marked as SRDP in 14 days. Images will be cleaned along with their parent calibrations 14 days after they're ingested.

Edited by Daniel Nemergut

Merge request reports