-
Notifications
You must be signed in to change notification settings - Fork 149
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
RuntimeError: There is no current event loop in thread 'Thread-1'. #30
Comments
@rutsky any thoughts on how to handle this? I'm guessing there is an event loop in a background thread? The safety check we have here https://github.com/litl/backoff/blob/master/backoff/_decorator.py#L65 is what is blowing up. |
@bgreen-litl this is indeed bug in safety check. I haven't expected that missing global event loop will blow |
@rutsky thank you! @luckydonald I will get a roll a 1.4.1 release with this fix. Thanks for the report. |
👍 Awesome, thanks! |
backoff==1.4.1 is released @luckydonald I also exposed a |
Yeah! I'll try later today |
Works. Fantastic. |
So what fails is:
When calling
teleflask/messages.py
:315.The actual fail in backoff is
_decorator.py
(functiondef decorate(target)
afterasyncio.iscoroutinefunction(target)
was false.For reference, this is luckydonald/teleflask@
777953
, runningexamples/example2.py
. (Flask internal debug server)Mac OS
10.9.5
Python
3.6.0
(via brew)backoff: Maybe
1.4.0
?The text was updated successfully, but these errors were encountered: