This repository has been archived by the owner on Oct 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement single blocking asyncio.wait for ArtifactDownloader
The ArtifactDownloader had two locations where it could block: dequeue from the upstream stage queue and waiting for downloads to finish. When downloads were ongoing, no new work could be accepted (even when below the limit of concurrent downloads). Fix this by waiting on both upstream content units and downloads at the same time. Additionally, refactor the huge method into a "run" class with state. This allows to split up the functionality into smaller methods without passing a large set of parameters around. Restructure the tasks: Tasks are handling one content instance in the form of a single coroutine now. The coroutine computes the artifacts to download, downloads them and updates the content instance. The overall limit on the number of concurrent downloads is restricted by a common semaphore. Add unit tests using simulated downloads and clocks to verify the dynamic behavior of ArtifactDownloader. closes #4018 https://pulp.plan.io/issues/4018
- Loading branch information
Showing
2 changed files
with
442 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.