-
Notifications
You must be signed in to change notification settings - Fork 983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async::HTTP::Faraday cannot use "in_parallel" #1583
Comments
I'm not a fan myself of the current interface, but as it was pointed out in this comment it is actually possible to deal with this by using the Although I agree with you |
We could sniff whether e.g. parallel_manager.method(:run).parameters.empty? That would make it an option to make the proposed change Another option is to introduce a different method and use |
Unorthodox, but it would work. |
The new interface passes the parallel block with all the requests to the ParallelManager, instead of running it beforehand. This allows for better, stateless ParallelManager implementations. Fixes #1583
The new interface passes the parallel block with all the requests to the ParallelManager, instead of running it beforehand. This allows for better, stateless ParallelManager implementations. Fixes #1583
* Add support for a new `ParallelManager#execute` method. The new interface passes the parallel block with all the requests to the ParallelManager, instead of running it beforehand. This allows for better, stateless ParallelManager implementations. Fixes #1583 * Update docs/adapters/custom/parallel-requests.md Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com> --------- Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
@ioquatix FYI – just released Faraday 2.11.0 with support for the new |
Thanks for working with me on this new feature! |
We need to wrap the requests with
Async{}
but the parallel manager is only called AFTER the fact.https://github.com/lostisland/faraday/blob/3efc0a89825da053e7beb85b9b264f424df0e893/lib/faraday/connection.rb#L324C1-L325C29
In other words, it would be better:
The text was updated successfully, but these errors were encountered: