Skip to content

Commit dfcece4

Browse files
committed
chore: use context in report_analytics_workflow
1 parent 45b3421 commit dfcece4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/local_workflows/report_analytics_workflow.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ func callEndpoint(invocationCtx workflow.InvocationContext, input workflow.Data,
151151
return fmt.Errorf("invalid payload type: %T", input.GetPayload())
152152
}
153153

154-
req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(byteData))
154+
// Use context from invocation to respect timeout/cancellation
155+
req, err := http.NewRequestWithContext(invocationCtx.Context(), http.MethodPost, url, bytes.NewBuffer(byteData))
155156
if err != nil {
156157
return fmt.Errorf("error creating request: %w", err)
157158
}

0 commit comments

Comments
 (0)