Skip to content

Comments

fix(health/arrs): improve health check scheduling and arrs integration#188

Merged
javi11 merged 6 commits intojavi11:mainfrom
drondeseries:fix/health-check-improvements
Dec 31, 2025
Merged

fix(health/arrs): improve health check scheduling and arrs integration#188
javi11 merged 6 commits intojavi11:mainfrom
drondeseries:fix/health-check-improvements

Conversation

@drondeseries
Copy link
Contributor

Summary

This PR introduces improvements to the health check scheduling system and fixes a configuration requirement for Sonarr integration.

Changes

Health Check System

  • Periodic Re-checks for Healthy Files: Modified GetUnhealthyFiles query to include files marked as healthy if their scheduled_check_at time has passed. This enables the intended tiered scheduling strategy (aggressive -> daily -> normal) to function effectively, ensuring long-term validation of file retention.
  • Repair Retry Delay: Added a 1-hour backoff delay (scheduled_check_at = datetime('now', '+1 hour')) when updating status to repair_triggered. This prevents rapid retry loops when repairs fail.

Arrs Integration

  • Optional Library Directory: Updated triggerSonarrRescanByPath to treat Health.LibraryDir as optional. Previously, missing this configuration would cause the repair process to error out. It now gracefully handles the missing config by falling back to other path resolution methods.

Code Cleanup

  • Linter Fixes: Removed an unused sync.WaitGroup field in internal/importer/service.go.

drondeseries and others added 6 commits December 28, 2025 23:49
refactor(health): remove dead code and fix Go anti-patterns (javi11#179)
Previously, the health repair process would fail if 'health.library_dir' was not configured, even though it was only used for logging in the Sonarr rescan logic. This change makes it optional, preventing repair failures for users with default configurations.
@javi11 javi11 merged commit 4bbbe0c into javi11:main Dec 31, 2025
1 check passed
@drondeseries drondeseries deleted the fix/health-check-improvements branch January 2, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants