Skip to content

Commit

Permalink
Merge pull request #600 from sennetconsortium/maxsibilla/uwsgi-update
Browse files Browse the repository at this point in the history
Maxsibilla/uwsgi update
  • Loading branch information
maxsibilla authored Dec 11, 2024
2 parents cc23202 + 3c01aab commit 4f5d8ad
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.19
1.4.20
15 changes: 14 additions & 1 deletion ingest-api-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.0
info:
description: |
A RESTful web service exposing calls needed for the SenNet Data Sharing Portal.
version: 1.4.19
version: 1.4.20
title: SenNet Ingest API
contact:
name: SenNet Help Desk
Expand Down Expand Up @@ -625,6 +625,19 @@ paths:
"500":
description: An unexpected error occurred

/metadata/provenance-metadata/{identifier}:
get:
tags:
- metadata
summary: Returns the full provenance metadata for the provided dataset and all of its ancestors.
responses:
"200":
description: The JSON containing full provenance metadata
"401":
description: User's token is not valid
"500":
description: An unexpected error occurred

/sources/bulk/validate:
post:
tags:
Expand Down
2 changes: 1 addition & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
# Log rotation is handled via logrotate on the host system with a configuration file
# Do NOT handle log file and rotation via the Python logging to avoid issues with multi-worker processes
logging.basicConfig(format='[%(asctime)s] %(levelname)s in %(module)s: %(message)s',
level=logging.DEBUG,
level=logging.INFO,
datefmt='%Y-%m-%d %H:%M:%S')
logger = logging.getLogger(__name__)

Expand Down
14 changes: 9 additions & 5 deletions src/uwsgi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# So uwsgi knows where to mount the app
chdir = /usr/src/app/src

# Application's callbale
# Application's callable
module = wsgi:application

# Location of uwsgi log file
Expand All @@ -12,12 +12,14 @@ logto = /usr/src/app/log/uwsgi-ingest-api.log
# By default uWSGI allocates a very small buffer (4096 bytes) for the headers of each request
buffer-size = 32768

# Master with 2 worker process (based on CPU number)
# Master with 16 worker processes (based on CPU number)
master = true
processes = 2
processes = 16

# Enable multithreading for ingest-api
enable-threads = true
# Enable the multithreading within uWSGI
# Launch the application across multiple threads inside each process
enable-threads = True
threads = 16

# Use http socket for integration with nginx
# 127.0.0.1:5000 or localhost:5000 won't work with Docker
Expand All @@ -29,3 +31,5 @@ vacuum = true

# Ensure compatibility with init system
die-on-term = true

attach-daemon = python worker.py

0 comments on commit 4f5d8ad

Please sign in to comment.