This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch feat#5841-4
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/feat#5841-4 by this push:
new b1b28c966 fix: use manager.TimeAfter instead of syncPolicy.TimeAfter
b1b28c966 is described below
commit b1b28c96624b78317019a9232e944e237427b7b9
Author: abeizn <[email protected]>
AuthorDate: Wed Sep 13 16:50:16 2023 +0800
fix: use manager.TimeAfter instead of syncPolicy.TimeAfter
---
backend/helpers/pluginhelper/api/api_collector_with_state.go | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/backend/helpers/pluginhelper/api/api_collector_with_state.go
b/backend/helpers/pluginhelper/api/api_collector_with_state.go
index e2be9edd1..813a75f73 100644
--- a/backend/helpers/pluginhelper/api/api_collector_with_state.go
+++ b/backend/helpers/pluginhelper/api/api_collector_with_state.go
@@ -165,14 +165,12 @@ func NewStatefulApiCollectorForFinalizableEntity(args
FinalizableApiCollectorArg
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 if syncPolicy != nil && syncPolicy.TimeAfter != nil {
- createdAfter = syncPolicy.TimeAfter
+ } else {
+ createdAfter = manager.TimeAfter
}
// step 1: create a collector to collect newly added records