-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
subreddit.stream.submissions() stops after an hour or so #16
Comments
My current work around is to break the loop after a 100 posts or so. And start it over again |
This makes sense in part due to Reddit marking the Access Token as invalid after an hour, therefore PRAW needs to re-request a new token. But what doesn't make sense is that this should occur in the background. Is any exception being printed? In async functions, exceptions do not terminate the program, but instead, get printed to STDERR if not handled. |
No, I'm not aware of any exceptions sadly |
I ran across this issue. If the last item grabbed from the stream is deleted, asyncPRAW never grabs the next item. It has something to do with the "before" variable, but I don't fully understand why that is. There are no exceptions in the background. To Reproduce
|
Is this reproducible in normal PRAW or what? |
This is very interesting and it would also affect main PRAW as well. This could be why some streams randomly stop producing results. I wonder if this is related to praw-dev/praw#1025. |
Does this occur to items deleted as well? |
My testing with main PRAW does not have the same bug. Main PRAW seems to occasionally poll the new.json endpoint without the Looking through PRAW vs asyncPRAW, the only difference in the StreamGenerator that could trigger this is one line: PRAW: asyncPRAW: asyncpraw/asyncpraw/models/util.py Line 185 in d9b61d3
|
Verified the PR works with the sample code provided. |
Describe the bug
subreddit.stream.submissions() stops after an hour or so
To Reproduce
Steps to reproduce the behavior:
Expected behavior
submissions.stream() never stops
Code/Logs
It reaches the end of the for loop before just dying, so I'm not expecting there being a blocking method that may be causing this
System Info
The text was updated successfully, but these errors were encountered: