Commit 71064f67 authored by Igor's avatar Igor Committed by Jacob Vosmaer

Pass CORRELATION_ID env variable to resize image subprocesses

parent 5a2a990f
---
title: Pass CORRELATION_ID env variable to resize image subprocesses
merge_request: 612
author:
type: other
......@@ -46,6 +46,8 @@ const (
maxAllowedFileSizeBytes = 250 * 1000 // 250kB
)
var envInjector = tracing.NewEnvInjector()
// Images might be located remotely in object storage, in which case we need to stream
// it via http(s)
var httpTransport = tracing.NewRoundTripper(correlation.NewInstrumentedRoundTripper(&http.Transport{
......@@ -218,6 +220,7 @@ func startResizeImageCommand(ctx context.Context, imageReader io.Reader, errorWr
"GL_RESIZE_IMAGE_WIDTH=" + strconv.Itoa(int(params.Width)),
"GL_RESIZE_IMAGE_CONTENT_TYPE=" + params.ContentType,
}
cmd.Env = envInjector(ctx, cmd.Env)
stdout, err := cmd.StdoutPipe()
if err != nil {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment