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
Despite making async calls, Vespa.feed_async_iterable is itself a synchronous method.
When using Vespa inside an asynchronous context such as a web server, this runs into the classic RuntimeError: asyncio.run() cannot be called from a running event loop error because feed_async_iterable defines a run() wrapper that's passed to asyncio.run to make the method synchronous. As a result, it's tricky to run parallel operations without organizing the tasks yourself.
A possible solution is to give VespaAsync it's own feed_async_iterable method.
The text was updated successfully, but these errors were encountered:
Despite making async calls,
Vespa.feed_async_iterable
is itself a synchronous method.When using Vespa inside an asynchronous context such as a web server, this runs into the classic
RuntimeError: asyncio.run() cannot be called from a running event loop
error becausefeed_async_iterable
defines arun()
wrapper that's passed toasyncio.run
to make the method synchronous. As a result, it's tricky to run parallel operations without organizing the tasks yourself.A possible solution is to give
VespaAsync
it's ownfeed_async_iterable
method.The text was updated successfully, but these errors were encountered: