Project

Profile

Help

Refactor #4336

closed

Refactoring the download stage

Added by mdellweg over 5 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

While experimenting with failsafe DeclarativeArtifacts, a discussion [0] came up that the ArtifactStage does not use the right level of abstraction.
In the current implementation, it works at the DeclarativeContent level and creates downloader coroutines to be run afterwards. After obtaining the download results, an expensive lookup of the corresponding DeclarativeArtifacts is performed in order to update them.

Proposed refactoring:
Move creating download coroutines, running them and updating the associated Artifact to a coroutine `download` in the class DeclarativeArtifacts. All neccesary information is already there.

[0] https://github.com/pulp/pulpcore-plugin/pull/30#issuecomment-452919468

Also available in: Atom PDF