generated from superdesk/newsroom-app
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CPCN-326] improve(api): Use separate process for push celery worker (#…
…132) * [CPCN-326] improve(api): Move push api/worker to separate processes * fix mgmt_api/products (due to changes in superdesk/newsroom-core#578) * fix(behave): Add cache_type to config * config(fireq): Enable separate upstream for push endpoints * Revert "config(fireq): Enable separate upstream for push endpoints" This reverts commit 719faff. * Remove `push` endpoints process * improve(web wsgi): Use gunicorn_config similar to Superdesks
- Loading branch information
1 parent
a528e9b
commit 8dc1bc5
Showing
4 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
web: gunicorn -b 0.0.0.0:$PORT -w 3 newsroom.web.app:app | ||
web: gunicorn -c gunicorn_config.py newsroom.web.app:app | ||
websocket: python -m newsroom.web.ws | ||
worker: celery -A newsroom.web.worker.celery worker | ||
worker: celery -A newsroom.web.worker.celery worker -X "${SUPERDESK_CELERY_PREFIX}newsroom.push" | ||
push_worker: celery -A newsroom.web.worker.celery worker -Q "${SUPERDESK_CELERY_PREFIX}newsroom.push" | ||
beat: celery -A newsroom.web.worker.celery beat | ||
newsapi: gunicorn -b "0.0.0.0:${APIPORT:-$PORT}" -w 3 newsroom.news_api.app:app | ||
mgmtapi: gunicorn -b "0.0.0.0:${MGMTPORT:-$PORT}" -w 3 cp.mgmt_api.app:app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import os | ||
import multiprocessing | ||
|
||
port = os.environ.get("PORT", "5000") | ||
bind = f"0.0.0.0:{port}" | ||
workers = int(os.environ.get("WEB_CONCURRENCY", multiprocessing.cpu_count() + 1)) | ||
|
||
accesslog = "-" | ||
access_log_format = "%(m)s %(U)s status=%(s)s time=%(T)ss size=%(B)sb" | ||
|
||
reload = 'SUPERDESK_RELOAD' in os.environ | ||
timeout = int(os.environ.get('WEB_TIMEOUT', 30)) |