chore: prune runtime slo reports

This commit is contained in:
John
2026-07-02 08:38:56 +08:00
parent bb98734d9c
commit 8a53dff856
3 changed files with 84 additions and 3 deletions
@@ -11,6 +11,7 @@ GUI="gui/$(id -u)"
HOUR="${MEMIND_RUNTIME_SLO_HOUR:-23}"
MINUTE="${MEMIND_RUNTIME_SLO_MINUTE:-55}"
REPORT_DIR="${MEMIND_RUNTIME_REPORT_DIR:-$ROOT/reports/runtime-slo}"
RETENTION_DAYS="${MEMIND_RUNTIME_SLO_RETENTION_DAYS:-30}"
mkdir -p "$HOME/Library/LaunchAgents" "$HOME/Library/Logs" "$REPORT_DIR"
@@ -34,6 +35,9 @@ cat > "$PLIST" <<EOF
<string>$NODE_BIN</string>
<string>$SCRIPT</string>
<string>--write-report</string>
<string>--prune</string>
<string>--retention-days</string>
<string>$RETENTION_DAYS</string>
<string>--report-dir</string>
<string>$REPORT_DIR</string>
</array>
@@ -69,4 +73,5 @@ echo "installed $PLIST"
echo "script: $SCRIPT"
echo "schedule: daily ${HOUR}:${MINUTE}"
echo "report_dir: $REPORT_DIR"
echo "retention_days: $RETENTION_DAYS"
echo "log: $LOG"