diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-01-23 15:55:48 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-01-23 15:55:48 -1000 |
| commit | 54f091e1b920943967c6aebc9c1f3122ce52e267 (patch) | |
| tree | ea60ba6e86aa9247e73a30094a1be6f39bff0b56 /internal/config | |
| parent | bc4149d7c9fe7a698cf07895b504ab8f2b26f649 (diff) | |
Fix critical resilience issues from code review
- DB connection pool: Allow 5 connections instead of 1 for better concurrency
- JSON unmarshal: Add error handling to prevent nil slice issues
- Context cancellation: Check ctx.Done() in aggregateData goroutines
- Migration path: Make configurable via MIGRATION_DIR env var
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index ba2719d..62e733a 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -20,6 +20,7 @@ type Config struct { // Paths DatabasePath string + MigrationDir string TemplateDir string StaticDir string @@ -44,6 +45,7 @@ func Load() (*Config, error) { // Paths DatabasePath: getEnvWithDefault("DATABASE_PATH", "./dashboard.db"), + MigrationDir: getEnvWithDefault("MIGRATION_DIR", "migrations"), TemplateDir: getEnvWithDefault("TEMPLATE_DIR", "web/templates"), StaticDir: getEnvWithDefault("STATIC_DIR", "web/static"), |
