🐛 Source zendesk-support: make ticket_metrics stream stop requesting data after start_date #48427
+11
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
The
ticket_metrics
stream fetches data from the API from most recent to least recent. The state of the most recent record is kept as a cursor for the next stream.If a start_date is set in the config, the stream should stop fetching data once we have reached that page, however it currently keeps importing data until no more pages are remaining. (The data is queried from the API but not yielded as a record).
The PR stores the oldest seen record and stops fetching data if that is older than the start date.
Closes #48424
How
Review guide
User Impact
Can this PR be safely reverted and rolled back?