-
Notifications
You must be signed in to change notification settings - Fork 183
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
How to avoid flathunter.exceptions.StampedeProtectionException
#328
Comments
Hi @conorheins , When you first run the app, it will find a lot of listings and send a lot of messages. This triggers the HTTP 429 error from the Telegram messaging API. The StampedeProtection is supposed to then pause ( Usually after the first couple of runs, the local database ( |
I see, that makes sense. Yeah unfortunately in my case the app actually just terminated entirely, so the Python program was actually interrupted. So it wasn't idling/waiting for the next loop unfortunately. |
Looking at the code (https://github.com/flathunters/flathunter/blob/main/flathunter/sender_telegram.py#L154-L161), it seems that we just raise the exception and never handle it. But the sleep is already in there - it might be enough just to swallow the exception (or not even raise it in the first place). I'll see if I find time to mess with this this week (but of course, pull requests welcome if you have a setup where you can reproduce the issue! :) ) |
Good to know, thanks -- I will try to just comment that block of lines out / not raise the exception, if i get to a place where I can reproduce the issue. My current problem is now that IS24 is constantly detecting me as a bot (aka our discussion in #302), so I'm not even getting that far. |
First of all, thank you very much for creating this great app!
I ran into an issue when getting my first set of results from flathunter, seemingly due to the the
StampedeProtectionException
. Can anyone suggest a way to change the config file to avoid this?It seems like too many messages are being received too fast, so the app craps out and terminates itself. See screenshot for detailed error message below:
With the key lines seeming to be this trace back:
In case relevant, I also leave my config yaml below.
Any help in figuring this out would be really helpful -- thanks in advance :)
The text was updated successfully, but these errors were encountered: