From f319db6bd5f8a6f8a591e11efd5a2a9ab731b855 Mon Sep 17 00:00:00 2001 From: LucasArmandVast Date: Mon, 12 Jan 2026 20:03:18 -0500 Subject: [PATCH] flag for model log rotate (#78) --- start_server.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/start_server.sh b/start_server.sh index 129031c..2faefd2 100755 --- a/start_server.sh +++ b/start_server.sh @@ -90,7 +90,8 @@ echo_var DEBUG_LOG echo_var PYWORKER_LOG echo_var MODEL_LOG -if [ -e "$MODEL_LOG" ]; then +ROTATE_MODEL_LOG="${ROTATE_MODEL_LOG:-false}" +if [ "$ROTATE_MODEL_LOG" = "true" ] && [ -e "$MODEL_LOG" ]; then echo "Rotating model log at $MODEL_LOG to $MODEL_LOG.old" if ! cat "$MODEL_LOG" >> "$MODEL_LOG.old"; then report_error_and_exit "Failed to rotate model log"