You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "klesh (via GitHub)" <gi...@apache.org> on 2023/02/23 02:54:31 UTC

[GitHub] [incubator-devlake] klesh commented on a diff in pull request #4489: refactor: sonarqube adopts timeAfter

klesh commented on code in PR #4489:
URL: https://github.com/apache/incubator-devlake/pull/4489#discussion_r1115192276


##########
backend/plugins/sonarqube/tasks/accounts_collector.go:
##########
@@ -37,7 +37,7 @@ func CollectAccounts(taskCtx plugin.SubTaskContext) errors.Error {
 	logger := taskCtx.GetLogger()
 	logger.Info("collect accounts")
 
-	collectorWithState, err := helper.NewApiCollectorWithState(*rawDataSubTaskArgs, data.CreatedDateAfter)
+	collectorWithState, err := helper.NewApiCollectorWithState(*rawDataSubTaskArgs, data.TimeAfter)

Review Comment:
   Should be using `NewStatefulApiCollector`



##########
backend/plugins/sonarqube/tasks/filemetrics_collector.go:
##########
@@ -33,7 +34,7 @@ var _ plugin.SubTaskEntryPoint = CollectFilemetrics
 
 func CollectFilemetrics(taskCtx plugin.SubTaskContext) errors.Error {
 	rawDataSubTaskArgs, data := CreateRawDataSubTaskArgs(taskCtx, RAW_FILEMETRICS_TABLE)
-	collectorWithState, err := helper.NewApiCollectorWithState(*rawDataSubTaskArgs, data.CreatedDateAfter)
+	collectorWithState, err := helper.NewApiCollectorWithState(*rawDataSubTaskArgs, data.TimeAfter)

Review Comment:
   same as above



##########
backend/plugins/sonarqube/tasks/accounts_collector.go:
##########
@@ -37,7 +37,7 @@ func CollectAccounts(taskCtx plugin.SubTaskContext) errors.Error {
 	logger := taskCtx.GetLogger()
 	logger.Info("collect accounts")
 
-	collectorWithState, err := helper.NewApiCollectorWithState(*rawDataSubTaskArgs, data.CreatedDateAfter)
+	collectorWithState, err := helper.NewApiCollectorWithState(*rawDataSubTaskArgs, data.TimeAfter)

Review Comment:
   Where does the `state` get utilized?  I see nowhere referencing collector `WithState.TimeAfter`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org