This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new f046007b fix: add inc for lost (#2544)
f046007b is described below
commit f046007b336549b8b70be6d32056ebec10998f91
Author: mappjzc <[email protected]>
AuthorDate: Wed Jul 20 10:57:36 2022 +0800
fix: add inc for lost (#2544)
Add IncProgress to results range for ApiExtractor
Add IncProgress to ApiCollector when items was zero.
Nddtfjiang <[email protected]>
---
plugins/helper/api_collector.go | 1 +
plugins/helper/api_extractor.go | 1 +
2 files changed, 2 insertions(+)
diff --git a/plugins/helper/api_collector.go b/plugins/helper/api_collector.go
index eadff643..60be876f 100644
--- a/plugins/helper/api_collector.go
+++ b/plugins/helper/api_collector.go
@@ -355,6 +355,7 @@ func (collector *ApiCollector) fetchAsync(reqData
*RequestData, handler func(int
// save to db
count := len(items)
if count == 0 {
+ collector.args.Ctx.IncProgress(1)
return nil
}
db := collector.args.Ctx.GetDal()
diff --git a/plugins/helper/api_extractor.go b/plugins/helper/api_extractor.go
index 9d057409..4d58c076 100644
--- a/plugins/helper/api_extractor.go
+++ b/plugins/helper/api_extractor.go
@@ -128,6 +128,7 @@ func (extractor *ApiExtractor) Execute() error {
if err != nil {
return err
}
+ extractor.args.Ctx.IncProgress(1)
}
extractor.args.Ctx.IncProgress(1)
}