Coderabbit nitpicks.

This commit is contained in:
Adam Outler
2025-10-19 15:12:27 +00:00
parent 131c0c0f4b
commit dcf250d36f
7 changed files with 48 additions and 18 deletions

View File

@@ -5,11 +5,12 @@ export INSTALL_DIR=/app
# Check if there are any entries with cron_restart_backend
if grep -q "cron_restart_backend" "${LOG_EXECUTION_QUEUE}"; then
# Restart python application using s6
killall python3
sleep 2
/services/start-backend.sh &
# Remove all lines containing cron_restart_backend from the log file
sed -i '/cron_restart_backend/d' "${LOG_EXECUTION_QUEUE}"
# Atomic replacement with temp file
grep -v "cron_restart_backend" "${LOG_EXECUTION_QUEUE}" > "${LOG_EXECUTION_QUEUE}.tmp" && \
mv "${LOG_EXECUTION_QUEUE}.tmp" "${LOG_EXECUTION_QUEUE}"
fi