From 203dcc2ffb7ceb2a44754b3c8e1d13fc33349fb1 Mon Sep 17 00:00:00 2001 From: Ivan Milchev Date: Wed, 6 Mar 2024 14:19:42 +0100 Subject: [PATCH] set flag when storeresults is called Signed-off-by: Ivan Milchev --- explorer/scan/local_scanner.go | 5 +++-- mql/internal/collector.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/explorer/scan/local_scanner.go b/explorer/scan/local_scanner.go index 4c5502abb9..3e61afacc9 100644 --- a/explorer/scan/local_scanner.go +++ b/explorer/scan/local_scanner.go @@ -616,8 +616,9 @@ func (s *localAssetScanner) runQueryPack() (*AssetReport, error) { log.Debug().Msg("not storing resource data for this asset, nothing available") } else { _, err = conductor.StoreResults(context.Background(), &explorer.StoreResultsReq{ - AssetMrn: s.job.Asset.Mrn, - Resources: data, + AssetMrn: s.job.Asset.Mrn, + Resources: data, + IsLastBatch: true, }) if err != nil { return nil, err diff --git a/mql/internal/collector.go b/mql/internal/collector.go index 3272e3e389..becffc19d4 100644 --- a/mql/internal/collector.go +++ b/mql/internal/collector.go @@ -141,7 +141,7 @@ type FuncCollector struct { SinkDataFunc func(results []*llx.RawResult) } -func (c *FuncCollector) SinkData(results []*llx.RawResult, isDone bool) { +func (c *FuncCollector) SinkData(results []*llx.RawResult) { if len(results) == 0 || c.SinkDataFunc == nil { return }