cf. <https://github.com/pantsbuild/pants/pull/1148...
# development
h
cf. https://github.com/pantsbuild/pants/pull/11484#discussion_r562043546 , do we have an equivalent of the scheduler
product_request
method that works in parallel like
MultiGet
? @witty-crayon-22786
f
there is a
.execution_request
that takes a list of products. it is used internally by
.product_request
.
so seems straight-forward to write the “MultiGet” version of product_request?
w
it’s already a batch API
that’s why the second argument is a list
Copy code
targets_per_address = self._scheduler.product_request(Targets, [Params(Addresses([addr])) for addr in addresses])
f
but that only works if converting to the same type though, right?
i.e., in your example, to
Targets
it seems like it wouldn’t handle being a sync version of a MultiGet with heterogeneous result types
w
correct. i was just responding to the comment on the ticket
f
probably a question for @hundreds-breakfast-49010 then: what are the result types that the code in question needed to compute?
h
in this case they were all the same type, I just wanted to get many
Targets
back in parallel, which the API as it exists supports