potash / drain

pipeline library
MIT License
12 stars 5 forks source link

autoclean #51

Closed potash closed 6 years ago

potash commented 6 years ago

From comments of #7: Could have drain --autoclean delete any step output that is:

missing a target file (i.e. never successfully ran)
stale target, which can be determined by trying to construct the given object:
    if it fails to construct then something is wrong with the args (signature changed, etc.)
    if it constructs, then collect all source code timestamps for all inputs and ensure target timestamp is newer.

need to be careful though. could have an interactive mode or dump a list of steps eligible for cleanup.

potash commented 6 years ago

Deleting missing targets is now possible with:

drain list --complete --invert | xargs rm -r

potash commented 6 years ago

@geneorama fyi