Project

Profile

Help

Issue #1481

closed

Add the ability to abort downloads in the `download_started` event.

Added by jcline@redhat.com over 8 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
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

Actions #1

Updated by jcline@redhat.com over 8 years ago

  • Description updated (diff)
Actions #2

Updated by jcline@redhat.com over 8 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to jcline@redhat.com
Actions #3

Updated by jcline@redhat.com over 8 years ago

  • Status changed from ASSIGNED to POST

Added by Jeremy Cline over 8 years ago

Revision ace55e5a | View on GitHub

An individual request can now be canceled.

The DownloadRequest class now has a canceled field which, if set, causes the request to be canceled.

closes #1481

Actions #4

Updated by Anonymous over 8 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #5

Updated by mhrivnak over 8 years ago

  • Triaged changed from No to Yes
Actions #6

Updated by rbarlow about 8 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
  • Target Release - Nectar set to 1.4.4
Actions #7

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF