Project

Profile

Help

Task #8496

Updated by bmbouter about 3 years ago

## Problem 1 

 The `pulpcore.plugin.tasking.enqueue_with_reservation` interface, unfortunately, is tied to RQ because the return object is an RQ job. This prevents us from switching the implemenation away from RQ. 

 ## Problem 2 

 The `options` keyword is RQ specific also, so we can't keep that as part of the new `dispatch` function signature. 

 ## Solution 

 1. Deprecate the `pulpcore.plugin.tasking.enqueue_with_reservation` 
 2. Introduce a new interface `pulpcore.plugin.tasking.dispatch` which will have the following function signature: 

 `def ``` 
 def dispatch(func, resources, args=None, kwargs=None, task_group=None):` task_group=None): 
 ``` 

 The dispatch method will return the Task object.

Back