-
Notifications
You must be signed in to change notification settings - Fork 59
Run requests asynchronously #134
Comments
At first, I want to appreciate the suggestions @strix made. It comes really handy 👍 @certifiedloud, the answer is simple. When I started creating this tool, I haven't thought about some performance optimizations. I thought about how to link those requests together and how to use values from previous requests - synchronous requests were the first reasonable option that came to my mind. Sorry that it's such a shame, but you're welcome to contribute to this project. |
@eykrehbein I'll probably take a whack at it if you don't mind. I have some thoughts to make this possible but you know the code more than anyone and may have a better solution than whatever one I come up with. |
@strix Sure go ahead please! Well actually I barely remember what I've written there because school is kinda taff at the moment.. :D But I read a few lines and I guess you should take a look at this line https://github.com/eykrehbein/strest/blob/master/src/test.ts#L104. At this point the loop which starts the synchronous testing begins. So you'll need to create an if statement and deny this loop to be executed if the Maybe I'll create a complete rewrite of this project in the next weeks or so including the listr library as default output (for synchronous executions aswell) and simplified syntax. (because currently the syntax isn't my best friend to be honest) |
Running all of the requests synchronously takes a lot of time. Running requests asynchronously would be much faster.
I know there's a lot to consider here with what is already in place especially when considering dependent variables from other requests.
I was thinking of these changes to the yaml to accomplish this:
In this scenario:
healthCheck
,longRunningRequest
andlogin
all run/resolve asynchronously.login
returns successfully,authNeeded
andanotherAuthNeeded
both run asynchronously. If there are more dependent requests, their names are added to therequires
list and are only ran after the dependencies have returned successfully.listr seems like it would come in handy to accomplish this.
The text was updated successfully, but these errors were encountered: