Se agrego celery y respuestas instantaneas

This commit is contained in:
2025-08-10 16:26:15 -06:00
parent 03fe18c314
commit 705fa1eb8f
12 changed files with 1569 additions and 13 deletions

54
supervisor_celery.conf Normal file
View File

@@ -0,0 +1,54 @@
[program:efc_celery_worker]
command=/usr/local/bin/python -m celery -A celery_app worker --loglevel=info --pool=solo
directory=/app
user=fastapi
numprocs=1
stdout_logfile=/app/logs/celery_worker.log
stderr_logfile=/app/logs/celery_worker_error.log
stdout_logfile_maxbytes=50MB
stderr_logfile_maxbytes=50MB
autostart=true
autorestart=true
startsecs=10
stopwaitsecs=600
killasgroup=true
priority=998
environment=REDIS_HOST="redis_microservice_dev",REDIS_PORT="6379",REDIS_DB="0",PYTHONPATH="/app:/home/fastapi/.local/lib/python3.11/site-packages",PATH="/home/fastapi/.local/bin:/usr/local/bin:%(ENV_PATH)s"
[program:efc_celery_beat]
command=/usr/local/bin/python -m celery -A celery_app beat --loglevel=info
directory=/app
user=fastapi
numprocs=1
stdout_logfile=/app/logs/celery_beat.log
stderr_logfile=/app/logs/celery_beat_error.log
stdout_logfile_maxbytes=50MB
stderr_logfile_maxbytes=50MB
autostart=false
autorestart=true
startsecs=10
stopwaitsecs=600
killasgroup=true
priority=999
environment=REDIS_HOST="redis_microservice_dev",REDIS_PORT="6379",REDIS_DB="0",PYTHONPATH="/app:/home/fastapi/.local/lib/python3.11/site-packages",PATH="/home/fastapi/.local/bin:/usr/local/bin:%(ENV_PATH)s"
[program:efc_fastapi]
command=/usr/local/bin/python -m uvicorn main:app --host 0.0.0.0 --port 8001 --workers 1
directory=/app
user=fastapi
numprocs=1
stdout_logfile=/app/logs/fastapi.log
stderr_logfile=/app/logs/fastapi_error.log
stdout_logfile_maxbytes=50MB
stderr_logfile_maxbytes=50MB
autostart=true
autorestart=true
startsecs=10
stopwaitsecs=600
killasgroup=true
priority=997
environment=PYTHONPATH="/app:/home/fastapi/.local/lib/python3.11/site-packages",PATH="/home/fastapi/.local/bin:/usr/local/bin:%(ENV_PATH)s"
[group:efc_services]
programs=efc_celery_worker,efc_fastapi
priority=999