Project

Profile

Help

Issue #7497

Updated by bmbouter over 3 years ago

## Use case 

 Say you dispatch N repo sync's every 6 hours, where N is large > 500 repos. Then say the server's Pulp is syncing from are temporarily slow, so they tasks are backing up enough that another "set" of sync's are dispatched. The user would like to cancel enough sync's so that for each repository there is only one, but they cannot know which ones to cancel because the reserved_resource_records field is not yet set. 

 ## Proposal 

 Have the [`TaskSerializer.reserved_resources_records`](https://github.com/pulp/pulpcore/blob/6cce0895d3b19c395de680b7d568a3dfa87c9833/pulpcore/app/serializers/task.py#L103) record the reservations that "will be created" prior to them being created. 

 ## Question 

 For the data this serializer will display, should these be strings or actual ForeignKeys? TBD 

Back