Skip to content

Commit

Permalink
always Wait
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Dec 24, 2024
1 parent 3eef689 commit 620f5a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flow/activities/flowable.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ func (a *FlowableActivity) SyncFlow(
}
logger.Error("failed to sync records", slog.Any("error", syncErr))
close(cdcState.syncDone)
return syncErr
return errors.Join(syncErr, cdcState.errGroup.Wait())
} else {
totalRecordsSynced += numRecordsSynced
logger.Info("Total records synced",
logger.Info("synced records",
slog.Int64("numRecordsSynced", numRecordsSynced), slog.Int64("totalRecordsSynced", totalRecordsSynced))

if options.NumberOfSyncs > 0 && currentSyncFlowNum >= options.NumberOfSyncs {
Expand Down

0 comments on commit 620f5a8

Please sign in to comment.