Background logs to stdout (#315)

This commit is contained in:
Chris Weaver
2023-08-18 19:02:32 -07:00
committed by GitHub
parent f541a3ee85
commit 067503bc84
2 changed files with 12 additions and 15 deletions

View File

@@ -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 $?

View File

@@ -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