Address PR review feedback for DISCORD_WEBHOOK_URL env var
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m32s
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m32s
- Add DISCORD_WEBHOOK_URL to docker-compose.yml api service environment block - Add empty placeholder entry in .env for discoverability - Move DISCORD_WEBHOOK_URL constant to the env-var constants section at top of dependencies.py Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3be4f71e22
commit
1bcde424c6
3
.env
3
.env
@ -6,6 +6,9 @@ SBA_DB_USER_PASSWORD=your_production_password
|
||||
# SBa API
|
||||
API_TOKEN=Tp3aO3jhYve5NJF1IqOmJTmk
|
||||
|
||||
# Integrations
|
||||
DISCORD_WEBHOOK_URL=
|
||||
|
||||
# Universal
|
||||
TZ=America/Chicago
|
||||
LOG_LEVEL=INFO
|
||||
@ -22,6 +22,9 @@ logger = logging.getLogger("discord_app")
|
||||
# level=log_level
|
||||
# )
|
||||
|
||||
# Discord integration
|
||||
DISCORD_WEBHOOK_URL = os.environ.get("DISCORD_WEBHOOK_URL")
|
||||
|
||||
# Redis configuration
|
||||
REDIS_HOST = os.environ.get("REDIS_HOST", "localhost")
|
||||
REDIS_PORT = int(os.environ.get("REDIS_PORT", "6379"))
|
||||
@ -503,9 +506,6 @@ def update_season_pitching_stats(player_ids, season, db_connection):
|
||||
raise
|
||||
|
||||
|
||||
DISCORD_WEBHOOK_URL = os.environ.get("DISCORD_WEBHOOK_URL")
|
||||
|
||||
|
||||
def send_webhook_message(message: str) -> bool:
|
||||
"""
|
||||
Send a message to Discord via webhook.
|
||||
|
||||
@ -34,6 +34,7 @@ services:
|
||||
- REDIS_HOST=sba_redis
|
||||
- REDIS_PORT=6379
|
||||
- REDIS_DB=0
|
||||
- DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL}
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
|
||||
Loading…
Reference in New Issue
Block a user