Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion config.sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ health:
segment_sample_percentage: 5 # Percentage of segments to sample for health validation (1-100, default: 5)
acceptable_missing_segments_percentage: 0 # Percentage of missing segments allowed before a file is marked as corrupted (0-100, default: 0)
library_sync_interval_minutes: 360 # Library synchronization interval in minutes (default: 360 = 6 hours)
library_sync_concurrency: 1 # Number of concurrent library sync operations (default: 1)
library_sync_concurrency: 5 # Number of concurrent library sync operations (default: 5)
resolve_repair_on_import: false # Automatically resolve pending repairs in the same directory when a new file is imported (default: false)

# WebDAV mount path configuration
Expand Down
12 changes: 2 additions & 10 deletions internal/health/library_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -652,11 +652,7 @@ func (lsw *LibrarySyncWorker) SyncLibrary(ctx context.Context, dryRun bool) *Dry
close(done)
}()

// Get concurrency setting (default to 10 if not set)
concurrency := cfg.Health.LibrarySyncConcurrency
if concurrency <= 0 {
concurrency = 10
}
concurrency := cfg.GetLibrarySyncConcurrency()

// Create a worker pool for parallel metadata reading
p := pool.New().WithMaxGoroutines(concurrency)
Expand Down Expand Up @@ -1744,11 +1740,7 @@ func (lsw *LibrarySyncWorker) syncMetadataOnly(ctx context.Context, startTime ti
var filesToAdd []database.AutomaticHealthCheckRecord
var filesToAddMu sync.Mutex

// Get concurrency setting (default to 10 if not set)
concurrency := cfg.Health.LibrarySyncConcurrency
if concurrency <= 0 {
concurrency = 10
}
concurrency := cfg.GetLibrarySyncConcurrency()

// Create a worker pool for parallel metadata reading
p := pool.New().WithMaxGoroutines(concurrency)
Expand Down
Loading