Merge pull request #2755 from danswer-ai/hotfix/v0.6-supervisord-logs

backport update indexing and slack bot to use stdout options (#2752)
This commit is contained in:
rkuo-danswer 2024-10-09 18:26:19 -07:00 committed by GitHub
commit 9d4ecf817f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,12 +7,13 @@ logfile=/var/log/supervisord.log
# Cannot place this in Celery for now because Celery must run as a single process (see note below)
# Indexing uses multi-processing to speed things up
[program:document_indexing]
environment=CURRENT_PROCESS_IS_AN_INDEXING_JOB=true,LOG_FILE_NAME=document_indexing
environment=CURRENT_PROCESS_IS_AN_INDEXING_JOB=true
command=python danswer/background/update.py
stdout_logfile=/var/log/document_indexing.log
stdout_logfile_maxbytes=16MB
redirect_stderr=true
autorestart=true
# Background jobs that must be run async due to long time to completion
# NOTE: due to an issue with Celery + SQLAlchemy
# (https://github.com/celery/celery/issues/7007#issuecomment-1740139367)
@ -31,7 +32,8 @@ command=celery -A danswer.background.celery.celery_run:celery_app worker
--loglevel=INFO
--logfile=/var/log/celery_worker_supervisor.log
-Q celery,vespa_metadata_sync,connector_deletion
environment=LOG_FILE_NAME=celery_worker
stdout_logfile=/var/log/celery_worker.log
stdout_logfile_maxbytes=16MB
redirect_stderr=true
autorestart=true
@ -39,7 +41,8 @@ autorestart=true
[program:celery_beat]
command=celery -A danswer.background.celery.celery_run:celery_app beat
--logfile=/var/log/celery_beat_supervisor.log
environment=LOG_FILE_NAME=celery_beat
stdout_logfile=/var/log/celery_beat.log
stdout_logfile_maxbytes=16MB
redirect_stderr=true
# Listens for Slack messages and responds with answers
@ -48,7 +51,8 @@ redirect_stderr=true
# More details on setup here: https://docs.danswer.dev/slack_bot_setup
[program:slack_bot]
command=python danswer/danswerbot/slack/listener.py
environment=LOG_FILE_NAME=slack_bot
stdout_logfile=/var/log/slack_bot.log
stdout_logfile_maxbytes=16MB
redirect_stderr=true
autorestart=true
startretries=5
@ -58,12 +62,10 @@ startsecs=60
# No log rotation here, since it's stdout it's handled by the Docker container logging
[program:log-redirect-handler]
command=tail -qF
/var/log/document_indexing_info.log
/var/log/celery_beat_supervisor.log
/var/log/celery_worker_supervisor.log
/var/log/celery_beat_debug.log
/var/log/celery_worker_debug.log
/var/log/slack_bot_debug.log
/var/log/document_indexing.log
/var/log/celery_beat.log
/var/log/celery_worker.log
/var/log/slack_bot.log
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true