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
28 changes: 0 additions & 28 deletions config/altmount.log

This file was deleted.

15 changes: 14 additions & 1 deletion internal/importer/scanner/nzbdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (n *NzbDavImporter) performImport(ctx context.Context, dbPath string, rootF
}

// Create workers
numWorkers := 20 // 20 parallel workers for file creation
numWorkers := 4 // Use fewer parallel workers for file creation
var workerWg sync.WaitGroup
batchChan := make(chan *database.ImportQueueItem, 100)

Expand All @@ -145,6 +145,19 @@ func (n *NzbDavImporter) performImport(ctx context.Context, dbPath string, rootF
n.processBatch(ctx, batchChan)
}()

// Monitor error channel in background to catch query/DB failures early
go func() {
for err := range errChan {
if err != nil {
n.log.ErrorContext(ctx, "Error during NZBDav parsing", "error", err)
n.mu.Lock()
msg := err.Error()
n.info.LastError = &msg
n.mu.Unlock()
}
}
}()

// Start workers
for i := 0; i < numWorkers; i++ {
workerWg.Add(1)
Expand Down
Loading
Loading