build: use gateway's solve context to allow cancelling getResultAt

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-04-21 10:52:03 +01:00
parent 3d49bbd23a
commit 2402607846
2 changed files with 2 additions and 3 deletions

View File

@ -19,8 +19,7 @@ import (
"github.com/sirupsen/logrus"
)
func NewResultContext(c *client.Client, solveOpt client.SolveOpt, res *gateway.Result) (*ResultContext, error) {
ctx := context.Background()
func NewResultContext(ctx context.Context, c *client.Client, solveOpt client.SolveOpt, res *gateway.Result) (*ResultContext, error) {
def, err := getDefinition(ctx, res)
if err != nil {
return nil, err