Avoid creating executor job in requirements if another call satisfied the requirement (#73451)

This commit is contained in:
J. Nick Koston 2022-06-13 11:33:29 -10:00 committed by GitHub
parent bb8b51eda3
commit 08b55939fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -231,9 +231,9 @@ class RequirementsManager:
async with self.pip_lock:
# Recaculate missing again now that we have the lock
await self._async_process_requirements(
name, self._find_missing_requirements(requirements)
)
missing = self._find_missing_requirements(requirements)
if missing:
await self._async_process_requirements(name, missing)
def _find_missing_requirements(self, requirements: list[str]) -> list[str]:
"""Find requirements that are missing in the cache."""