Skip to content

Commit

Permalink
Reduce worker on storage
Browse files Browse the repository at this point in the history
  • Loading branch information
Elia Palme committed Dec 19, 2024
1 parent 891a6cb commit 660cd11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions deploy/docker/storage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions src/tests/automated_tests/integration/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 660cd11

Please sign in to comment.