Files
dsas-cca-backend-bun/example.env
JamesFlare1212 32dee6b161 fix(cache): resolve scanning stop issue and add cache TTL management
- Fix Redis SCAN cursor type conversion (Buffer to String) to prevent early termination
- Add progress logging in initializeClubCache (every 100 activities with summary)
- Add Redis memory limits (512MB with LRU eviction policy)
- Implement cache TTL: 24h for normal data, 1h for error states (allows retry)
- Fix Docker permission issue by running app container as root
- Add TTL configuration to .env and example.env

Root cause: SCAN cursor comparison failed due to type mismatch (Buffer vs String)
Impact: Scanning now processes all 5000+ IDs instead of stopping at ~300
2026-04-06 21:03:30 -04:00

37 lines
1019 B
Bash

API_USERNAME=
API_PASSWORD=
PORT=3000
FIXED_STAFF_ACTIVITY_ID=7095
ALLOWED_ORIGINS=*
S3_ENDPOINT=
S3_PUBLIC_URL=
S3_BUCKET_NAME=
S3_ACCESS_KEY_ID=
S3_SECRET_ACCESS_KEY=
S3_REGION=
S3_PUBLIC_URL_PREFIX=files
REDIS_URL=redis://:dsas-cca@redis:6379
MIN_ACTIVITY_ID_SCAN=3000
MAX_ACTIVITY_ID_SCAN=8000
CONCURRENT_API_CALLS=16
STAFF_UPDATE_INTERVAL_MINS=360
CLUB_UPDATE_INTERVAL_MINS=360
LOG_LEVEL=info # Example: 'debug', 'info', 'warn', 'error'
# Cache TTL Configuration (in seconds)
ACTIVITY_CACHE_TTL=86400 # 24 hours for normal activity data
STAFF_CACHE_TTL=86400 # 24 hours for staff data
ERROR_CACHE_TTL=3600 # 1 hour for error states (allows retry)
# Proxy Configuration (Optional)
# Set USE_PROXY=true to enable proxy for Playwright requests
USE_PROXY=false
# Custom proxy server (default: socks5://warp-proxy:9091 when using warp-proxy service)
# Examples:
# HTTP: http://proxy.example.com:8080
# SOCKS5: socks5://proxy.example.com:1080
# Warp: socks5://warp-proxy:9091
ALL_PROXY=
HTTP_PROXY=
HTTPS_PROXY=