Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: Add support for WEB_CONCURRENCY environment variable #1633

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

adamantike
Copy link
Contributor

Description

The WEB_CONCURRENCY environment variable is a more common way to configure the number of workers for Gunicorn [1] or other web servers.

This change maintains GUNICORN_WORKERS compatibility, while notifying users that it is deprecated and should be replaced with WEB_CONCURRENCY.

It would also allow us to replace Gunicorn with another web server in the future without changing the variable name.

[1] https://docs.gunicorn.org/en/stable/settings.html#workers

Checklist

Please check all that apply.

  • I've tested the changes locally
  • I've updated the wiki accordingly
  • I've have updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes
  • All existing tests are passing

Copy link

github-actions bot commented Feb 19, 2025

Test Results

93 tests  ±0   93 ✅ ±0   26s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 9602d58. ± Comparison against base commit d24f981.

♻️ This comment has been updated with latest results.

adamantike added a commit to adamantike/romm-wiki that referenced this pull request Feb 19, 2025
`WEB_CONCURRENCY` replaces `GUNICORN_WORKERS` as the environment
variable to set the number of processes running the web application.

Depends on rommapp/romm#1633.
The `WEB_CONCURRENCY` environment variable is a more common way to
configure the number of workers for Gunicorn [1] or other web servers.

This change maintains `GUNICORN_WORKERS` compatibility, while notifying
users that it is deprecated and should be replaced with
`WEB_CONCURRENCY`.

It would also allow us to replace Gunicorn with another web server in
the future without changing the variable name.

[1] https://docs.gunicorn.org/en/stable/settings.html#workers
@adamantike adamantike force-pushed the misc/add-WEB_CONCURRENCY-support branch from 37db031 to 9602d58 Compare February 19, 2025 03:31
@adamantike adamantike merged commit 4f5b7aa into master Feb 19, 2025
8 checks passed
@adamantike adamantike deleted the misc/add-WEB_CONCURRENCY-support branch February 19, 2025 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants