From e910b2580280fcde2cc4f7a0314e1f1312fdb222 Mon Sep 17 00:00:00 2001 From: Amogh Bharadwaj Date: Fri, 31 May 2024 19:58:52 +0530 Subject: [PATCH] Add heartbeat routine in ReplicateQRepPartitions (#1774) Add heartbeat routine in ReplicateQRepPartitions activity --- flow/activities/flowable.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flow/activities/flowable.go b/flow/activities/flowable.go index 901ab5016..844c60c08 100644 --- a/flow/activities/flowable.go +++ b/flow/activities/flowable.go @@ -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)