Skip to content

Commit

Permalink
fix: db timeafter adjust (#7314)
Browse files Browse the repository at this point in the history
  • Loading branch information
abeizn authored Apr 12, 2024
1 parent ddedcac commit d0b3182
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/helpers/pluginhelper/api/api_collector_with_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,12 @@ func NewStatefulApiCollector(args RawDataSubTaskArgs) (*ApiCollectorStateManager

currentTime := time.Now()
oldState.LatestSuccessStart = &currentTime
oldState.TimeAfter = syncPolicy.TimeAfter
if syncPolicy != nil {
oldState.TimeAfter = syncPolicy.TimeAfter
if syncPolicy.TimeAfter != nil && oldTimeAfter != nil && (oldTimeAfter).Before(*syncPolicy.TimeAfter) && !syncPolicy.FullSync {
oldState.TimeAfter = oldTimeAfter
}
}

return &ApiCollectorStateManager{
RawDataSubTaskArgs: args,
Expand Down

0 comments on commit d0b3182

Please sign in to comment.