Project

Profile

Help

Story #2570

closed

As a user, I can turn off the deferred download tasks

Added by ipanova@redhat.com about 7 years ago. Updated about 5 years ago.

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

0%

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

Description

We have a periodical download_deferred task that runs every X interval
https://github.com/pulp/pulp/blob/master/server/pulp/server/async/celery_instance.py#L36

The problem is that - the task is triggered even if there is no content to download, and even if there are no repos with lazy policy. I suggest not to create the task if` _get_deferred_content_units()` does not return anything. https://github.com/pulp/pulp/blob/master/server/pulp/server/controllers/repository.py#L1379

Current behavior can be annoying and misdealing when you check your task list:
NOTE: that this is the output from pulp that has just 1 repo and this repo has immediate policy.

Operations:  deferred_download
Resources:   
State:       Successful
Start Time:  2017-02-06T09:04:22Z
Finish Time: 2017-02-06T09:04:22Z
Task Id:     38a938ce-5af2-488a-a2e2-e8884aef8e05

Operations:  deferred_download
Resources:   
State:       Successful
Start Time:  2017-02-06T09:34:22Z
Finish Time: 2017-02-06T09:34:23Z
Task Id:     43cc2ef3-90fa-49fa-ad8a-648de98ca374

Operations:  deferred_download
Resources:   
State:       Successful
Start Time:  2017-02-06T10:04:22Z
Finish Time: 2017-02-06T10:04:23Z
Task Id:     c332b903-c98a-4b9a-8e9a-c2912e4f7186

Operations:  deferred_download
Resources:   
State:       Successful
Start Time:  2017-02-06T10:34:22Z
Finish Time: 2017-02-06T10:34:22Z
Task Id:     60cb0571-a0cf-4e3b-bda0-9d16d310445b

Operations:  deferred_download
Resources:   
State:       Successful
Start Time:  2017-02-06T11:04:22Z
Finish Time: 2017-02-06T11:04:22Z
Task Id:     b2a47644-d4b6-460c-a611-f469565803cd

Operations:  deferred_download
Resources:   
State:       Successful
Start Time:  2017-02-06T11:34:22Z
Finish Time: 2017-02-06T11:34:22Z
Task Id:     2cfc1a56-888a-4340-bf89-274bd3b3458f

Operations:       deferred_download
Resources:        
State:            Successful
Start Time:       2017-02-06T11:34:22Z
Finish Time:      2017-02-06T11:34:22Z
Result:           N/A
Task Id:          2cfc1a56-888a-4340-bf89-274bd3b3458f
Progress Report:  
  On Demand Download: 
    Description:   Download Cached On-Demand Content
    Details:       
    Error Details: 
    Items Total:   0
    Num Failures:  0
    Num Processed: 0
    Num Success:   0
    State:         FINISHED
    Step Id:       eaced2ca-1099-4fe8-bafa-b3333a1bafd3
    Step Type:     on_demand_download

Also available in: Atom PDF