refactor: rename Batch to Partition in error handling and processing functions for consistency

This commit is contained in:
2026-04-11 00:30:54 -05:00
parent 9eb9821daf
commit 955bc65ce9
10 changed files with 151 additions and 151 deletions

View File

@@ -21,9 +21,9 @@ func LoaderErrorHandler(
ctx context.Context,
maxRetryAttempts int,
chErrorsIn <-chan LoaderError,
chChunksOut chan<- models.Batch,
chBatchesOut chan<- models.Batch,
chJobErrorsOut chan<- JobError,
wgActiveChunks *sync.WaitGroup,
wgActiveBatches *sync.WaitGroup,
) {
for {
if ctx.Err() != nil {
@@ -42,7 +42,7 @@ func LoaderErrorHandler(
if err.RetryCounter >= maxRetryAttempts {
jobError := JobError{
ShouldCancelJob: false,
Msg: fmt.Sprintf("chunk %v reached max retries (%d)", err.Id, maxRetryAttempts),
Msg: fmt.Sprintf("Batch %v reached max retries (%d)", err.Id, maxRetryAttempts),
Prev: &err,
}
@@ -52,14 +52,14 @@ func LoaderErrorHandler(
return
}
wgActiveChunks.Done()
wgActiveBatches.Done()
continue
}
err.RetryCounter++
select {
case chChunksOut <- err.Batch:
case chBatchesOut <- err.Batch:
case <-ctx.Done():
return
}