feat(scanner): convert scan poll interval from minutes to seconds
- Rename SCAN_POLL_INTERVAL_MINUTES to SCAN_POLL_INTERVAL_SECONDS in config - Update MediaScanner to accept interval in seconds instead of minutes - Adjust default polling interval from 3 minutes to 30 seconds for faster response - Add debug logging for fsnotify events to aid troubleshooting file watching This change improves media file detection responsiveness by reducing the polling interval from minutes to seconds, while maintaining the file watcher as the primary detection mechanism.
This commit is contained in:
@@ -19,7 +19,7 @@ type Config struct {
|
||||
TestMode bool
|
||||
RateLimitEnabled bool
|
||||
RequestsPerMinute int
|
||||
ScanPollIntervalMinutes int `env:"SCAN_POLL_INTERVAL_MINUTES" default:"3"`
|
||||
ScanPollIntervalSeconds int `env:"SCAN_POLL_INTERVAL_SECONDS" default:"30"`
|
||||
}
|
||||
|
||||
func LoadConfig() *Config {
|
||||
@@ -37,7 +37,7 @@ func LoadConfig() *Config {
|
||||
TestMode: getEnvBool("TEST_MODE", false),
|
||||
RateLimitEnabled: getEnvBool("RATE_LIMIT_ENABLED", true),
|
||||
RequestsPerMinute: getEnvInt("REQUESTS_PER_MINUTE", 10),
|
||||
ScanPollIntervalMinutes: getEnvInt("SCAN_POLL_INTERVAL_MINUTES", 3),
|
||||
ScanPollIntervalSeconds: getEnvInt("SCAN_POLL_INTERVAL_SECONDS", 30),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user