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


##########
backend/helpers/pluginhelper/api/api_collector_with_state.go:
##########
@@ -154,18 +160,19 @@ func NewStatefulApiCollectorForFinalizableEntity(args 
FinalizableApiCollectorArg
                Options: args.Options,
                Params:  args.Params,
                Table:   args.Table,
-       }, args.TimeAfter)
+       })
        if err != nil {
                return nil, err
        }
 
        // // prepare the basic variables
+       syncPolicy := manager.Ctx.TaskContext().SyncPolicy()
        var isIncremental = manager.IsIncremental()
        var createdAfter *time.Time
        if isIncremental {
                createdAfter = manager.LatestState.LatestSuccessStart
-       } else {
-               createdAfter = manager.TimeAfter
+       } else if syncPolicy != nil && syncPolicy.TimeAfter != nil {

Review Comment:
   the change for this file should not be needed since 
https://github.com/apache/incubator-devlake/pull/6064/files#diff-c0bf74c35ffacb49d0e0b6a70207324ed5ae01fb1f4c841e2ebeb9bf6b0627c2R67
 already takes care the `manager.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: [email protected]

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

Reply via email to