Skip to content

Commit

Permalink
Merge branch 'main' into fix-create-peer-if-not-exists
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex authored May 20, 2024
2 parents 783d50f + 1ece82e commit 2a4df81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flow/connectors/kafka/qrep.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/twmb/franz-go/pkg/kgo"
lua "github.com/yuin/gopher-lua"

"github.com/PeerDB-io/peer-flow/connectors/utils"
"github.com/PeerDB-io/peer-flow/generated/protos"
"github.com/PeerDB-io/peer-flow/model"
"github.com/PeerDB-io/peer-flow/pua"
Expand All @@ -28,6 +29,11 @@ func (c *KafkaConnector) SyncQRepRecords(
numRecords := atomic.Int64{}
schema := stream.Schema()

shutdown := utils.HeartbeatRoutine(ctx, func() string {
return fmt.Sprintf("sent %d records to %s", numRecords.Load(), config.DestinationTableIdentifier)
})
defer shutdown()

queueCtx, queueErr := context.WithCancelCause(ctx)
pool, err := c.createPool(queueCtx, config.Script, config.FlowJobName, nil, queueErr)
if err != nil {
Expand Down

0 comments on commit 2a4df81

Please sign in to comment.