You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2023/12/19 07:03:45 UTC
(incubator-devlake) branch release-v0.20 updated: fix: collect all data when timeafter is nil (#6663) (#6664)
This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch release-v0.20
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v0.20 by this push:
new fbd4030a8 fix: collect all data when timeafter is nil (#6663) (#6664)
fbd4030a8 is described below
commit fbd4030a871a273ebf89049eb4d533fbe82b9c00
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Tue Dec 19 15:03:41 2023 +0800
fix: collect all data when timeafter is nil (#6663) (#6664)
Co-authored-by: abeizn <zi...@merico.dev>
---
backend/helpers/pluginhelper/api/api_collector_with_state.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/helpers/pluginhelper/api/api_collector_with_state.go b/backend/helpers/pluginhelper/api/api_collector_with_state.go
index a64f8a989..89315fb01 100644
--- a/backend/helpers/pluginhelper/api/api_collector_with_state.go
+++ b/backend/helpers/pluginhelper/api/api_collector_with_state.go
@@ -103,8 +103,8 @@ func NewStatefulApiCollector(args RawDataSubTaskArgs) (*ApiCollectorStateManager
var isIncremental bool
var since *time.Time
- if syncPolicy == nil {
- // 1. If no syncPolicy, incremental and since is oldState.LatestSuccessStart
+ if syncPolicy == nil || (syncPolicy != nil && syncPolicy.TimeAfter == nil) {
+ // 1. If no syncPolicy TimeAfter, incremental and since is oldState.LatestSuccessStart
isIncremental = true
since = oldLatestSuccessStart
} else if oldLatestSuccessStart == nil {