You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Paste the version from pip freeze | grep "eureka"
wasp-eureka==1.1.1
What did you do?
Using wasp_eureka register a python client to spring cloud.
Please provide a code example. If anything is private or sensitive, include a placeholder value
[import asyncio
from wasp_eureka import EurekaClient
app_name = 'test-app'
port = 8080
ip = '127.0.0.1'
my_eureka_url = 'my_url'
loop = asyncio.get_event_loop()
eureka = EurekaClient(app_name, port, ip, eureka_url=my_eureka_url,
loop=loop)
async def main():
result = await eureka.register()
assert result, 'Unable to register'
while True:
await asyncio.sleep(30)
await eureka.renew()
loop.run_until_complete(main())](url)
What did the code do?
/usr/local/lib/python3.7/site-packages/wasp_eureka/client.py:28: UserWarning: Creating a client session outside of coroutine is a very dangerous idea
'Content-Type': 'application/json',
Creating a client session outside of coroutine
client_session: <aiohttp.client.ClientSession object at 0x116a6f3c8>
Traceback (most recent call last):
File "/Users/aaron/mioto/pixel/PixelNlp/test1.py", line 32, in
loop.run_until_complete(main())
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete
return future.result()
File "/Users/aaron/mioto/pixel/PixelNlp/test1.py", line 21, in main
result = await eureka.register()
File "/usr/local/lib/python3.7/site-packages/wasp_eureka/client.py", line 158, in register
return await self._do_req(url, method='POST', data=json.dumps(payload))
File "/usr/local/lib/python3.7/site-packages/wasp_eureka/client.py", line 249, in _do_req
await resp.text())
wasp_eureka.exc.EurekaException
sys:1: RuntimeWarning: coroutine 'ClientSession.close' was never awaited
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x116a6f3c8>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x117258648>, 0.459410832)]']
connector: <aiohttp.connector.TCPConnector object at 0x116ae15c0>
What did you expect?
Please outline the expected behavior
The text was updated successfully, but these errors were encountered:
Version
Paste the version from
pip freeze | grep "eureka"
wasp-eureka==1.1.1
What did you do?
Using wasp_eureka register a python client to spring cloud.
Please provide a code example. If anything is private or sensitive, include a placeholder value
[import asyncio
from wasp_eureka import EurekaClient
app_name = 'test-app'
port = 8080
ip = '127.0.0.1'
my_eureka_url = 'my_url'
loop = asyncio.get_event_loop()
eureka = EurekaClient(app_name, port, ip, eureka_url=my_eureka_url,
loop=loop)
async def main():
result = await eureka.register()
assert result, 'Unable to register'
while True:
await asyncio.sleep(30)
await eureka.renew()
loop.run_until_complete(main())](
url
)What did the code do?
/usr/local/lib/python3.7/site-packages/wasp_eureka/client.py:28: UserWarning: Creating a client session outside of coroutine is a very dangerous idea
'Content-Type': 'application/json',
Creating a client session outside of coroutine
client_session: <aiohttp.client.ClientSession object at 0x116a6f3c8>
Traceback (most recent call last):
File "/Users/aaron/mioto/pixel/PixelNlp/test1.py", line 32, in
loop.run_until_complete(main())
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete
return future.result()
File "/Users/aaron/mioto/pixel/PixelNlp/test1.py", line 21, in main
result = await eureka.register()
File "/usr/local/lib/python3.7/site-packages/wasp_eureka/client.py", line 158, in register
return await self._do_req(url, method='POST', data=json.dumps(payload))
File "/usr/local/lib/python3.7/site-packages/wasp_eureka/client.py", line 249, in _do_req
await resp.text())
wasp_eureka.exc.EurekaException
sys:1: RuntimeWarning: coroutine 'ClientSession.close' was never awaited
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x116a6f3c8>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x117258648>, 0.459410832)]']
connector: <aiohttp.connector.TCPConnector object at 0x116ae15c0>
What did you expect?
Please outline the expected behavior
The text was updated successfully, but these errors were encountered: