From 750b903a9d79f01a0a845f7020f203306b0cd225 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Thu, 21 Jul 2022 22:56:50 +1000 Subject: [PATCH] using python unbuffered (-u) on job mgr to force output into log file --- TODO | 3 --- wrapper.sh | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/TODO b/TODO index d676108..a4078b2 100644 --- a/TODO +++ b/TODO @@ -10,9 +10,6 @@ all NMO's need to handle delete data and rebuild / allow recreation of content form FS (not just test, it causes a bug now / db constraint violation) --> need to test the 'override' when we re-ai-match (AFTER re-build from FS) - * capture pa_job_manager logs in prod - - redir'd to /var/log/pa* but NO content, seems wrong - * should I change the rotation code to use that jpeg util to reduce/remove compression loss? * should allow context menu from View thumbs (particularly useful on search) to show other files around this one by date (maybe that folder or something?) diff --git a/wrapper.sh b/wrapper.sh index cb9e2b6..e8d91e5 100755 --- a/wrapper.sh +++ b/wrapper.sh @@ -1,4 +1,4 @@ #!/bin/bash -su mythtv -g mythtv -c 'FLASK_ENV="production" python3 /code/pa_job_manager.py' > /var/log/pa_job_manager.out & +su mythtv -g mythtv -c 'FLASK_ENV="production" python3 -u /code/pa_job_manager.py' &> /var/log/pa_job_manager.out & gunicorn --bind=0.0.0.0:443 --workers=4 --threads=16 --certfile /etc/letsencrypt/live/pa.depaoli.id.au/fullchain.pem --keyfile /etc/letsencrypt/live/pa.depaoli.id.au/privkey.pem main:app --env FLASK_ENV="production" --error-logfile gunicorn.error.log --access-logfile gunicorn.log --capture-output