-
Notifications
You must be signed in to change notification settings - Fork 288
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
feat: expose extra env variables for more flexible infra tuning #1445
Conversation
WalkthroughThe pull request introduces configuration flexibility for the Huey task queue and Gunicorn server in the CISO Assistant backend. In Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
backend/ciso_assistant/settings.py (1)
421-428
: LGTM! Consider adding a comment about the environment variable.The implementation correctly allows for flexible Huey database path configuration while maintaining backward compatibility.
Consider adding a brief comment explaining the
HUEY_FILE_PATH
environment variable usage:## Huey settings +# HUEY_FILE_PATH: Optional environment variable to specify the Huey database file location +# Defaults to BASE_DIR/db/huey.db if not set HUEY_FILE_PATH = os.environ.get("HUEY_FILE_PATH", BASE_DIR / "db" / "huey.db")backend/startup.sh (1)
29-35
: Consider adding documentation about the environment variables.The Gunicorn configuration is now more flexible, but users need to know about these options.
Add a comment block explaining the available environment variables:
# Set default values for Gunicorn configuration +# Environment variables: +# - GUNICORN_WORKERS: Number of worker processes (default: 3) +# - GUNICORN_TIMEOUT: Worker timeout in seconds (default: 100) +# - GUNICORN_KEEPALIVE: Keep-alive timeout in seconds (default: 30) GUNICORN_WORKERS=${GUNICORN_WORKERS:-3} GUNICORN_TIMEOUT=${GUNICORN_TIMEOUT:-100} GUNICORN_KEEPALIVE=${GUNICORN_KEEPALIVE:-30}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
backend/ciso_assistant/settings.py
(1 hunks)backend/startup.sh
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (11)
- GitHub Check: startup-docker-compose-test
- GitHub Check: enterprise-startup-functional-test (3.12)
- GitHub Check: functional-tests (3.12, chromium)
- GitHub Check: enterprise-startup-docker-compose-test
- GitHub Check: Analyze (python)
- GitHub Check: startup-functional-test (3.12)
- GitHub Check: ruff (3.12)
- GitHub Check: enterprise-functional-tests (3.12, chromium)
- GitHub Check: test (3.12)
- GitHub Check: build (3.12)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
backend/startup.sh (1)
24-28
: LGTM! The default values are reasonable.The implementation properly exposes Gunicorn configuration through environment variables with sensible defaults:
GUNICORN_WORKERS
: 3 workers (good for most deployments)GUNICORN_TIMEOUT
: 100 seconds (suitable for most operations)GUNICORN_KEEPALIVE
: 30 seconds (standard keepalive value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary by CodeRabbit