Skip to content

Commit

Permalink
change to just set it to waitseconds plus 1min
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Jan 2, 2024
1 parent 01c2154 commit 722b174
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions flow/workflows/qrep_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,7 @@ func (q *QRepFlowExecution) consolidatePartitions(ctx workflow.Context) error {
func (q *QRepFlowExecution) waitForNewRows(ctx workflow.Context, lastPartition *protos.QRepPartition) error {
q.logger.Info("idling until new rows are detected")

waitActivityTimeout := 5 * time.Minute
if q.config.WaitBetweenBatchesSeconds >= 300 {
timeGap := 60
waitActivityTimeout = time.Duration(q.config.WaitBetweenBatchesSeconds+uint32(timeGap)) * time.Second
}
waitActivityTimeout := time.Duration(q.config.WaitBetweenBatchesSeconds+60) * time.Second
ctx = workflow.WithActivityOptions(ctx, workflow.ActivityOptions{
StartToCloseTimeout: 16 * 365 * 24 * time.Hour, // 16 years
HeartbeatTimeout: waitActivityTimeout,
Expand Down

0 comments on commit 722b174

Please sign in to comment.