Reporting: Handle timeouts in rendering (#20415)

* Added timeout in grpc call to plugins for rendering
This commit is contained in:
Jon Gyllenswärd
2019-11-18 16:58:15 +01:00
committed by GitHub
parent e7e416cf8a
commit 7a8c6a9b54
4 changed files with 20 additions and 5 deletions

View File

@@ -63,6 +63,9 @@ func (rs *RenderingService) renderViaPlugin(ctx context.Context, opts Opts) (*Re
return nil, err
}
ctx, cancel := context.WithTimeout(ctx, opts.Timeout)
defer cancel()
rsp, err := rs.grpcPlugin.Render(ctx, &pluginModel.RenderRequest{
Url: rs.getURL(opts.Path),
Width: int32(opts.Width),