Closed sixcorners closed 7 years ago
Can you please show the main
method you're trying to call? It looks like that is in your code (rather than the library's). If you are trying to import __main__.main
that isn't a supported usage - and is meant solely as a standalone way to execute the eureka registration and health heart beats.
wasp/eureka
is an asyncio library and it looks like you're trying to use it in a flask app, which may not work as you are hoping.
Ah, sorry was on mobile originally. I fixed the README code, the loop isn't used in that example and is implicitly grabbed via asyncio.get_event_loop()
in the aiohttp.ClientSession
. If you'd like to provide a loop you can in the EurekaClient as a keyword argument, which is probably what I meant originally in the README docs.
Thanks for the correction!
"wasp/eureka is an asyncio library and it looks like you're trying to use it in a flask app, which may not work as you are hoping."
Well.. those are scary words. Should I use aiohttp or SimpleHTTPServer instead? Anyway. Ya. That fixed it thanks.
Version
wasp-eureka==1.1.1
What did you do?
I used the code from the README.
What did the code do?
What did you expect?
It wouldn't throw that type error.
I don't know much about python but I know how to call stuff in other C-like languages. is that loop=loop in that main method call an error?
Helpful others:
```python
) for blocks