-
-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zenpy-489 resolve talk calls infinite loop issue #540
zenpy-489 resolve talk calls infinite loop issue #540
Conversation
Let me know if any feedback on this, happy to fix it up if there are problems. |
I do NOT want to just let the lie fallow. @Ptr314 Let's have a look. |
I do want to ensure there's a test for this @jimwbaldwin .... I'd like to at least reproduce the bug in some form first at the very least. |
@cryptomail No rush on my end to get it in. I coded the fix into my project but I'd love to remove that. If I recall correctly it was when there was a low number of results. So maybe if we can code a test to pull back just a few rows. I can take a look at the tests next week though it might take me a bit to figure them out. |
@@ -47,7 +49,10 @@ def next(self): | |||
self.handle_pagination() | |||
if len(self.values) < 1: | |||
raise StopIteration() | |||
if self.count is not None and self._iteration > self.count: | |||
raise StopIteration() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't disagree with this as a halting condition as long as this count doesn't change :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @dolbinskaBW
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I probably need to rework this, I was able to get some time to try a large extract from Talk and the count is per page, so if there was 1234 rows it was showing as 1000, then 234 on the next page. I was unable to use Zenpy directly because of this issue but yeah I don't think my fix is ready.
Apologies been swamped the last month but hopefully I get a bit to wrap this up.
THANK YOU SO MUCH!!!! |
Just set it to a draft as it isn't ready. |
Rationale
The talk incremental export currently gets stuck in an infinite loop when as the next() BaseResultGenerator cannot handle however the Zendesk API is returning the data for talk incremental.
Issue: #489
This PR is to hopefully address that issue.
Changes
Testing
- I have manually tested calling the talk API and it now returns my data without getting stuck in a loop.