From c6bf694015ad1833dc2d60989951c3a6e87d7029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Tue, 24 Dec 2024 14:05:09 +0000 Subject: [PATCH] always Wait --- flow/activities/flowable.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flow/activities/flowable.go b/flow/activities/flowable.go index 6c99b4f33e..ca4223434a 100644 --- a/flow/activities/flowable.go +++ b/flow/activities/flowable.go @@ -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 {