feat(core): Add configurable execution history limit (#5505)

* Prune execution data when more than cofnfigured limit

* use stricter typings

* use `pruneDataMaxCount`

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Ahsan Virani
2023-02-20 10:28:38 +01:00
committed by GitHub
parent 9a1e7b52f7
commit db702932f3
2 changed files with 27 additions and 1 deletions

View File

@@ -325,6 +325,16 @@ export const schema = {
default: 3600,
env: 'EXECUTIONS_DATA_PRUNE_TIMEOUT',
},
// Additional pruning option to delete executions if total count exceeds the configured max.
// Deletes the oldest entries first
// Default is 0 = No limit
pruneDataMaxCount: {
doc: 'Maximum number of executions to keep in DB. Default 0 = no limit',
format: Number,
default: 0,
env: 'EXECUTIONS_DATA_PRUNE_MAX_COUNT',
},
},
queue: {