indexify
indexify copied to clipboard
Support Async Functions
Currently functions in graph has to be synchronous -
def foo(url: str) -> str:
pass
This is a problem because people might want async functions for functions that does IO.
async def foo(url: str) -> str:
return await httpx.get(url).content
The function worker needs to detect if the user function is multiprocess and create an event loop, and call the function with asyncio.run or something of that nature. This might require our sdk to have async interfaces as well. That needs to be explored.
cc @Default2882
Will take a look at this! Feel free to assign it to me!