d4x1 commented on code in PR #5956:
URL: 
https://github.com/apache/incubator-devlake/pull/5956#discussion_r1305434541


##########
backend/plugins/zentao/tasks/shared.go:
##########
@@ -179,29 +179,29 @@ func ignoreHTTPStatus404(res *http.Response) errors.Error 
{
        return nil
 }
 
-func getProductIterator(taskCtx plugin.SubTaskContext) (dal.Rows, 
*api.DalCursorIterator, errors.Error) {
-       data := taskCtx.GetData().(*ZentaoTaskData)
-       db := taskCtx.GetDal()
-       clauses := []dal.Clause{
-               dal.Select("id"),
-               dal.From(&models.ZentaoProductSummary{}),
-               dal.Where(
-                       "project_id = ? AND connection_id = ?",
-                       data.Options.ProjectId, data.Options.ConnectionId,
-               ),
-       }
-
-       cursor, err := db.Cursor(clauses...)
-       if err != nil {
-               return nil, nil, err
-       }
-       iterator, err := api.NewDalCursorIterator(db, cursor, 
reflect.TypeOf(input{}))
-       if err != nil {
-               cursor.Close()
-               return nil, nil, err
-       }
-       return cursor, iterator, nil
-}
+//func getProductIterator(taskCtx plugin.SubTaskContext) (dal.Rows, 
*api.DalCursorIterator, errors.Error) {

Review Comment:
   I think we will use `getProductIterator ` later. Zentao plugin is under 
testing, and new requirements may oocur.



##########
backend/plugins/zentao/tasks/shared.go:
##########
@@ -179,29 +179,29 @@ func ignoreHTTPStatus404(res *http.Response) errors.Error 
{
        return nil
 }
 
-func getProductIterator(taskCtx plugin.SubTaskContext) (dal.Rows, 
*api.DalCursorIterator, errors.Error) {
-       data := taskCtx.GetData().(*ZentaoTaskData)
-       db := taskCtx.GetDal()
-       clauses := []dal.Clause{
-               dal.Select("id"),
-               dal.From(&models.ZentaoProductSummary{}),
-               dal.Where(
-                       "project_id = ? AND connection_id = ?",
-                       data.Options.ProjectId, data.Options.ConnectionId,
-               ),
-       }
-
-       cursor, err := db.Cursor(clauses...)
-       if err != nil {
-               return nil, nil, err
-       }
-       iterator, err := api.NewDalCursorIterator(db, cursor, 
reflect.TypeOf(input{}))
-       if err != nil {
-               cursor.Close()
-               return nil, nil, err
-       }
-       return cursor, iterator, nil
-}
+//func getProductIterator(taskCtx plugin.SubTaskContext) (dal.Rows, 
*api.DalCursorIterator, errors.Error) {

Review Comment:
   I think we will use `getProductIterator ` later. Zentao plugin is under 
testing, and new requirements may occur.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to