Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions internal/database/health_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (r *HealthRepository) GetUnhealthyFiles(ctx context.Context, limit int) ([]
WHERE scheduled_check_at IS NOT NULL
AND scheduled_check_at <= datetime('now')
AND retry_count < max_retries
AND status NOT IN ('repair_triggered', 'corrupted', 'checking', 'healthy')
AND status NOT IN ('repair_triggered', 'corrupted', 'checking')
ORDER BY priority DESC, scheduled_check_at ASC
LIMIT ?
`
Expand Down Expand Up @@ -975,7 +975,8 @@ func (r *HealthRepository) UpdateHealthStatusBulk(ctx context.Context, updates [
UPDATE file_health
SET repair_retry_count = repair_retry_count + 1, last_error = ?,
error_details = ?, status = 'repair_triggered',
updated_at = datetime('now'), last_checked = datetime('now')
updated_at = datetime('now'), last_checked = datetime('now'),
scheduled_check_at = datetime('now', '+1 hour')
WHERE file_path = ?
`)
if err != nil {
Expand Down
Loading