Closed Kobzol closed 1 year ago
I do not like inconsistency between "cleanup" and "delete-if-success". How you want to name keyword for removing empty files, as it will be also kind of "cleanup"?
I agree! But what name should be used on the CLI? Isn't delete-if-finished
a bit too long? Maybe it's fine…
Brainstorming:
del-if-finished
del-if-empty
/my/path/stdout:finished
/my/path/stdout:empty
/my/path/stdout:no-finished
/my/path/stdout:no-empty
/my/path/stdout:rm-finished
/my/path/stdout:rm-empty
/my/path/stdout:rm-if-finished
/my/path/stdout:rm-if-empty
Looking at my examples, I'm starting to slightly prefer the last one.
Renamed to rm-if-finished
and added documentation and changelog.
If a task succeeds, often we do not care about its stdout/stderr output. This PR adds a "file closing mode" to stdout/stderr, which makes HQ automatically remove the files from disk if their task succeeds.
Documentation and changelog isn't done yet, I first want to bakeshed the various names and flags :)