From 660cd1111f266a3cbe81abdcf50ac15ab15697a2 Mon Sep 17 00:00:00 2001 From: Elia Palme Date: Thu, 19 Dec 2024 16:06:11 +0100 Subject: [PATCH] Reduce worker on storage --- deploy/docker/storage/Dockerfile | 5 +++-- src/tests/automated_tests/integration/test_storage.py | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/docker/storage/Dockerfile b/deploy/docker/storage/Dockerfile index 20a23113..6c092c5a 100644 --- a/deploy/docker/storage/Dockerfile +++ b/deploy/docker/storage/Dockerfile @@ -36,6 +36,7 @@ ENV F7T_SSL_KEY /ssl/f7t_internal.key ENV F7T_GUNICORN_LOG --error-logfile ${F7T_LOG_PATH}/storage.gunicorn.log ENV F7T_GUNICORN_SSL --ciphers TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,TLS_AES_128_GCM_SHA256,DHE-RSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-GCM-SHA384,ECDHE-RSA-AES128-GCM-SHA256 \ --ssl-version TLSv1_2 --keyfile $F7T_SSL_KEY --certfile $F7T_SSL_CRT -ENV F7T_GUNICORN_WORKER --workers=1 --threads=1 -ENTRYPOINT /usr/local/bin/gunicorn ${F7T_GUNICORN_SSL} ${F7T_GUNICORN_WORKER} --bind :${F7T_STORAGE_PORT} ${F7T_GUNICORN_LOG} storage:app +# Note: storage workers are kept to 1 to reduce load on /taskslist endpoint + +ENTRYPOINT /usr/local/bin/gunicorn ${F7T_GUNICORN_SSL} --workers=1 --threads=1 --bind :${F7T_STORAGE_PORT} ${F7T_GUNICORN_LOG} storage:app diff --git a/src/tests/automated_tests/integration/test_storage.py b/src/tests/automated_tests/integration/test_storage.py index a835f29e..afaa6953 100644 --- a/src/tests/automated_tests/integration/test_storage.py +++ b/src/tests/automated_tests/integration/test_storage.py @@ -133,8 +133,7 @@ def test_post_upload_request(headers,targetPath, expected_response_code): # download from OS to FS is automatic download_ok = False for i in range(20): - r = requests.get(TASKS_URL +"/"+task_id, headers=headers, verify=False) - assert r.status_code == 200 + r = get_task(task_id, headers) if r.json()["task"]["status"] == "114": # import async_tasks -> async_tasks.ST_DWN_END download_ok = True break