python-eureka-client icon indicating copy to clipboard operation
python-eureka-client copied to clipboard

FastAPI Cannot run the event loop while another loop is running

Open Chandan746 opened this issue 2 years ago • 2 comments

I am using this package in my FastAPI project having async function.

  1. eureka_client.init(....) --> Success
  2. eureka_client.do_service(......) --> Cannot run the event loop while another loop is running

Chandan746 avatar Mar 21 '23 12:03 Chandan746

In async fun, please use

res = await eureka_client.do_service_async(...)

keijack avatar Mar 22 '23 01:03 keijack

You can use import nest_asyncio nest_asyncio.apply()

ahbe avatar Nov 17 '23 10:11 ahbe