feat: refactor error handling to accept max retry attempts as a parameter for improved flexibility

This commit is contained in:
2026-04-10 19:32:12 -05:00
parent d228a048b8
commit 9493a2d32f
5 changed files with 4 additions and 117 deletions

View File

@@ -67,8 +67,8 @@ func processMigrationJob(
}
}()
go custom_errors.ExtractorErrorHandler(jobCtx, chExtractorErrors, chBatches, chJobErrors, &wgActiveBatches)
go loaderErrorHandler(jobCtx, chLoadersErrors, chChunksTransformed, chJobErrors, &wgActiveChunks)
go custom_errors.ExtractorErrorHandler(jobCtx, job.Retry.Attempts, chExtractorErrors, chBatches, chJobErrors, &wgActiveBatches)
go loaderErrorHandler(jobCtx, job.Retry.Attempts, chLoadersErrors, chChunksTransformed, chJobErrors, &wgActiveChunks)
maxExtractors := min(job.MaxExtractors, len(batches))
log.Infof("Starting %d extractor(s)...", maxExtractors)