I had a function that made 3 requests to the OpenAI API with 3 different prompts. This function took more than 30 seconds to respond and gave a timeout. So I divided it into 3 functions, each one making a request to the OpenAI API in parallel. However, they still took more than 30 seconds to respond.
@Steven suggested that they be run asynchronously, but this is creating a queue of executions. While one is processed, the other two are waiting.
Is it possible to execute a function asynchronously but without a queue being created?
No. Perhaps you need to horizontally scale out your function workers
You are saying that if i execute it sync, making 3 requests to 3 different functions, it runs in parallel. But making the same 3 requests with async option, it creates a queue, and the only way to avoid it is scaling out?
Recommended threads
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...
- Can't login or deploy functions in Appwr...
Hello, since i updatet to the appwrite cli 6.1.0 i can't login or deploy functions with the cli. When i call the command: "appwrite get account --verbose" i ge...
- Create admin user?
I'm not really sure how this is supposed to work, I installed Appwrite through docker-compose and set it up. When I launched the app and went into it, I created...