diff --git a/.env b/.env index 958cc74..dbf2cfc 100644 --- a/.env +++ b/.env @@ -17,8 +17,8 @@ HIGH_LAYER_QUALITY=3 #Set LOW_QUALITY_LAYER_BITRATE to 0 if you only want one layer (highest quality) output. LOW_QUALITY_LAYER_BITRATE=400000 X264_SETTINGS=medium +#If True, subprocess output will be dumped to log files (very verbose, use with care) SUBPROCESS_VERBOSE_OUTPUT=False - #Number of gunicorn worker (should be set accordingly to your hardware) NUM_GUNICORN_WORKER=4 #If a tmdb API token is provided, Movies/Tv show cover will be downloaded from there. diff --git a/backend/StreamServerApp/views/tasks.py b/backend/StreamServerApp/views/tasks.py index 447269d..66ebd6c 100644 --- a/backend/StreamServerApp/views/tasks.py +++ b/backend/StreamServerApp/views/tasks.py @@ -15,6 +15,5 @@ class Task(APIView): def get(self, request, task_id): - logger.debug("task id = {} ".format(task_id)) state = result.AsyncResult(task_id).state return JsonResponse(status=200, data={'state': str(state)}) diff --git a/backend/start_celery_workers.sh b/backend/start_celery_workers.sh index 9093693..5b2e717 100755 --- a/backend/start_celery_workers.sh +++ b/backend/start_celery_workers.sh @@ -1,6 +1,5 @@ mkdir -p $HOME/run/celery/ -mkdir -p $HOME/log/celery/ -touch "$HOME/log/celery/test.log" +mkdir -p /debug/celery/ rm "$HOME/run/celery/*.pid" -celery multi start 2 -A StreamingServer -B:2 -Q:2 cpu_extensive -c:2 1 --pidfile="$HOME/run/celery/%n.pid" --logfile="$HOME/log/celery/test.log" -tail -f "$HOME/log/celery/test.log" \ No newline at end of file +celery multi start 2 -A StreamingServer -B:2 -Q:2 cpu_extensive -c:2 1 --pidfile="$HOME/run/celery/%n.pid" --logfile="/debug/celery/celery.log" +sleep infinity \ No newline at end of file diff --git a/docker-compose-debug.yml b/docker-compose-debug.yml index 33f93a5..8e807f7 100644 --- a/docker-compose-debug.yml +++ b/docker-compose-debug.yml @@ -54,6 +54,7 @@ services: - static_volume:/usr/static/ - torrent:/usr/torrent/:rw - secrets_volume:/secrets/ + - ./log/:/debug/ ports: - 1337:80 depends_on: diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index d82069f..c821ca9 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -48,6 +48,7 @@ services: - static_volume:/usr/static/ - torrent:/usr/torrent/:rw - secrets_volume:/secrets/ + - ./log/:/debug/ ports: - 1337:80 depends_on: diff --git a/nginx/nginx.conf b/nginx/nginx.conf index fbb41c2..3fa04c0 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -12,6 +12,9 @@ server { client_max_body_size 0; + access_log /debug/nginx-access.log; + error_log /debug/nginx-error.log; + location /admin/ { proxy_set_header 'Access-Control-Allow-Origin' '*';