Actions
Issue #1481
closedAdd the ability to abort downloads in the `download_started` event.
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Nectar:
Platform Release:
Target Release - Nectar:
1.4.4
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
The lazy download tasks check to see if files are present on disk when the `download_started` event is called. I'd like to be able halt a download in the `download_started` event if, say, the file exists and its checksum is what I expect. I would like to do this by raising some exception (SkipLocation looks like a likely candidate, though it appears to be used when the location isn't reachable, so maybe it's not appropriate.
The reason this is currently impossible is that the `download_started` call happens outside of the big try block: https://github.com/pulp/nectar/tree/5559de52c23e89a35d80febe38981c352a9cf5b0/nectar/downloaders/threaded.py#L205
Updated by jcline@redhat.com over 8 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to jcline@redhat.com
Updated by jcline@redhat.com over 8 years ago
- Status changed from ASSIGNED to POST
Added by Jeremy Cline over 8 years ago
Updated by Anonymous over 8 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset ace55e5a0d2a7c551936a7c3bf96ff3aab9cb461.
Updated by rbarlow about 8 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
- Target Release - Nectar set to 1.4.4
Actions
An individual request can now be canceled.
The
DownloadRequest
class now has acanceled
field which, if set, causes the request to be canceled.closes #1481