swh.loader.core.utils module

swh.loader.core.utils.clean_dangling_folders(dirpath, pattern_check, log=None)[source]
Clean up potential dangling temporary working folder rooted at

dirpath. Those folders must match a dedicated pattern and not belonging to a live pid.

  • dirpath (str) – Path to check for dangling files

  • pattern_check (str) – A dedicated pattern to check on first level directory (e.g swh.loader.mercurial., swh.loader.svn.) log (Logger): Optional logger