StackStorm has the ability to garbage collect itself, detailed here: Purging Old Operational Data — StackStorm 2.9.1 documentation
Mistral also has this ability, but is not enabled by default.
The following settings change be changed in /etc/mistral/mistral.conf to enable Mistral’s internal garbage collector:
[execution_expiration_policy]
#
# From mistral.config
#
# How often will the executions be evaluated (in minutes). For example
# for value 120 the interval will be 2 hours (every 2 hours). (integer
# value)
#evaluation_interval = <None>
# Evaluate from which time remove executions in minutes. For example
# when older_than = 60, remove all executions that finished a 60
# minutes ago or more. Minimum value is 1. Note that only final state
# execution will remove ( SUCCESS / ERROR ). (integer value)
#older_than = <None>
Example
[execution_expiration_policy]
# 10 minutes
evaluation_interval = 10
# 30 days
older_than = 43200
After changing the config, simply restart Mistral:
systemctl restart mistral