Add more options regarding "executions/logs retention"

It would help if there was a node for:

My use case:

I have a workflow that triggers every 5 seconds.

It generates way too much logs, and I eventually disabled “Save executions” for successful production runs.

Bit it’s not ideal, I’d like to retain those logs at least for a time. I’d like to have the ability to select for how long those should be retained instead of a YES/NO choice, which can’t cover a good variety of businesses requirements.

Typically, choices could be:

  • 1h
  • 12h
  • 1d
  • 1 month
  • 6 months

Of course, this choice should keep overriding the defaults configured via ENV variables, same as it behaves now.

This way, I could configure intense workflows that aren’t critical (that’s my use-case here) with a small log retention (I’d typically use 1 day for this use-case), and have other more sensitive workflow retain logs/executions for far longer.

One important aspect to consider with retaining executions/logs, is how it affects the data storage. I ran into a SSD failure in the past due to lack of space in the disk, which was mainly caused by the logs growing out of control.

Adding a single “non-sensitive” workflow with “default” logs retention set to 1y, could potentially bring down the whole server 3 months from now, if we don’t notice the space being tight and solve the issue before it becomes critical.

Allowing more options regarding logs retention duration would improve the overall reliability of the system.