diff --git a/backend/danswer/background/run_all.sh b/backend/danswer/background/run_all.sh deleted file mode 100644 index 67728604b..000000000 --- a/backend/danswer/background/run_all.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -python danswer/background/update.py & - -python danswer/background/file_deletion.py & - -# Wait for any process to exit -wait -n - -# Exit with status of process that exited first -exit $? diff --git a/backend/supervisord.conf b/backend/supervisord.conf index 126e854a7..b42240619 100644 --- a/backend/supervisord.conf +++ b/backend/supervisord.conf @@ -6,22 +6,22 @@ logfile_maxbytes=0 [program:indexing] command=python danswer/background/update.py stdout_logfile=/var/log/update.log -redirect_stderr=true stdout_logfile_maxbytes=52428800 +redirect_stderr=true autorestart=true [program:connector_deletion] command=python danswer/background/connector_deletion.py stdout_logfile=/var/log/connector_deletion.log -redirect_stderr=true stdout_logfile_maxbytes=52428800 +redirect_stderr=true autorestart=true [program:file_deletion] command=python danswer/background/file_deletion.py stdout_logfile=/var/log/file_deletion.log -redirect_stderr=true stdout_logfile_maxbytes=52428800 +redirect_stderr=true autorestart=true # Listens for slack messages and responds with answers @@ -31,8 +31,16 @@ autorestart=true [program:slack_bot_listener] command=python danswer/listeners/slack_listener.py stdout_logfile=/var/log/slack_bot_listener.log -redirect_stderr=true stdout_logfile_maxbytes=52428800 +redirect_stderr=true autorestart=true startretries=5 startsecs=60 + +# pushes all logs from the above programs to stdout +[program:log-redirect-handler] +command=tail -qF /var/log/update.log /var/log/connector_deletion.log /var/log/file_deletion.log +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +redirect_stderr=true +autorestart=true