Fixup linting errors
This commit is contained in:
parent
2c7af058de
commit
2036aa7919
|
@ -133,6 +133,7 @@ func query(ctx *Context, u UpdateInfo, opts QueryOptions) result.Result {
|
||||||
|
|
||||||
func runQuery(cancelCtx *Context, u UpdateInfo, opts QueryOptions) result.Result {
|
func runQuery(cancelCtx *Context, u UpdateInfo, opts QueryOptions) result.Result {
|
||||||
ctx, cancelFunc := context.WithCancel(context.Background())
|
ctx, cancelFunc := context.WithCancel(context.Background())
|
||||||
|
contract.Ignore(cancelFunc)
|
||||||
|
|
||||||
src, err := newQuerySource(ctx, cancelCtx.BackendClient, u, opts)
|
src, err := newQuerySource(ctx, cancelCtx.BackendClient, u, opts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -142,16 +143,14 @@ func runQuery(cancelCtx *Context, u UpdateInfo, opts QueryOptions) result.Result
|
||||||
// Set up a goroutine that will signal cancellation to the plan's plugins if the caller context
|
// Set up a goroutine that will signal cancellation to the plan's plugins if the caller context
|
||||||
// is cancelled.
|
// is cancelled.
|
||||||
go func() {
|
go func() {
|
||||||
select {
|
<-cancelCtx.Cancel.Canceled()
|
||||||
// case <-ctx.Done():
|
|
||||||
case <-cancelCtx.Cancel.Canceled():
|
|
||||||
logging.V(4).Infof("engine.runQuery(...): signalling cancellation to providers...")
|
logging.V(4).Infof("engine.runQuery(...): signalling cancellation to providers...")
|
||||||
|
cancelFunc()
|
||||||
cancelErr := opts.plugctx.Host.SignalCancellation()
|
cancelErr := opts.plugctx.Host.SignalCancellation()
|
||||||
if cancelErr != nil {
|
if cancelErr != nil {
|
||||||
logging.V(4).Infof("engine.runQuery(...): failed to signal cancellation to providers: %v", cancelErr)
|
logging.V(4).Infof("engine.runQuery(...): failed to signal cancellation to providers: %v", cancelErr)
|
||||||
}
|
}
|
||||||
cancelFunc()
|
|
||||||
}
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
done := make(chan result.Result)
|
done := make(chan result.Result)
|
||||||
|
|
Loading…
Reference in a new issue