fix: Make result of RequestList.is_empty independent of fetch_next_request calls by janbuchar · Pull Request #876 · apify/crawlee-python
Conversation
The old version of RequestList only updated the _is_empty flag on fetch_next_request calls, which was not enough. This PR updates it so that the is_empty method also tries to dequeue a request from the iterator before returning a result.
labels
Jan 6, 2025Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to add a test case that covers the issue from the SDK?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters