Skip to content

Commit

Permalink
Add heartbeat routine in ReplicateQRepPartitions (#1774)
Browse files Browse the repository at this point in the history
Add heartbeat routine in ReplicateQRepPartitions activity
  • Loading branch information
Amogh-Bharadwaj authored May 31, 2024
1 parent ce685e0 commit e910b25
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flow/activities/flowable.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,11 @@ func (a *FlowableActivity) ReplicateQRepPartitions(ctx context.Context,
partitions *protos.QRepPartitionBatch,
runUUID string,
) error {
shutdown := heartbeatRoutine(ctx, func() string {
return "replicating partitions for job"
})
defer shutdown()

ctx = context.WithValue(ctx, shared.FlowNameKey, config.FlowJobName)
logger := log.With(activity.GetLogger(ctx), slog.String(string(shared.FlowNameKey), config.FlowJobName))
err := monitoring.UpdateStartTimeForQRepRun(ctx, a.CatalogPool, runUUID)
Expand Down

0 comments on commit e910b25

Please sign in to comment.