refactor: Web 服务器从 gunicorn 迁移到 uvicorn
This commit is contained in:
@@ -17,4 +17,17 @@ def test_worker_commands_use_taskiq() -> None:
|
||||
assert "core.taskiq.app:bulk_broker" in content
|
||||
assert 'pgrep -f "taskiq.*worker"' in content
|
||||
assert 'pkill -f "taskiq.*worker"' in content
|
||||
assert 'pgrep -f "gunicorn.*app:app"' in content
|
||||
assert 'pkill -f "gunicorn.*app:app"' in content
|
||||
assert removed_runner not in content
|
||||
|
||||
|
||||
def test_web_command_uses_uvicorn_only() -> None:
|
||||
content = APP_SCRIPT.read_text(encoding="utf-8")
|
||||
|
||||
assert "uv run uvicorn app:app" in content
|
||||
assert 'WEB_PORT="${SOCIAL_WEB__PORT:-5775}"' in content
|
||||
assert "SOCIAL_WEB__WORKERS" in content
|
||||
assert 'UVICORN_LOG_LEVEL="${UVICORN_LOG_LEVEL,,}"' in content
|
||||
assert "SOCIAL_WEB__GUNICORN__" not in content
|
||||
assert "uv run gunicorn" not in content
|
||||
|
||||
Reference in New Issue
Block a user