mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-04 15:03:10 -05:00
chore: remove gunicorn in favor of uvicorn workers (#3761)
This commit is contained in:
@@ -233,6 +233,19 @@ class AppSettings(BaseSettings):
|
||||
but will incur additional API costs
|
||||
"""
|
||||
|
||||
# ===============================================
|
||||
# Web Concurrency
|
||||
|
||||
WORKER_PER_CORE: int = 1
|
||||
"""Old gunicorn env for workers per core."""
|
||||
|
||||
UVICORN_WORKERS: int = 1
|
||||
"""Number of Uvicorn workers to run."""
|
||||
|
||||
@property
|
||||
def WORKERS(self) -> int:
|
||||
return max(1, self.WORKER_PER_CORE * self.UVICORN_WORKERS)
|
||||
|
||||
@property
|
||||
def OPENAI_ENABLED(self) -> bool:
|
||||
"""Validates OpenAI settings are all set"""
|
||||
|
||||
@@ -11,7 +11,7 @@ def main():
|
||||
port=settings.API_PORT,
|
||||
log_level=settings.LOG_LEVEL.lower(),
|
||||
log_config=log_config(),
|
||||
workers=1,
|
||||
workers=settings.WORKERS,
|
||||
forwarded_allow_ips=settings.HOST_IP,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user