Project

Profile

Help

Task #8496

closed

Task #8495: [EPIC] As a user, I have a new-improved tasking system with new-style workers

Deprecate `enqueue_with_reservation` from plugin API and introduce new `dispatch` interface to replace it

Added by bmbouter over 3 years ago. Updated over 3 years ago.

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

100%

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

Description

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 dispatch(func, resources, args=None, kwargs=None, task_group=None):

The dispatch method will return the Task object.


Related issues

Blocks Pulp - Task #8497: Remove the deprecated `enqueue_with_reservation` from the plugin APICLOSED - CURRENTRELEASEipanova@redhat.com

Actions
Blocks Pulp - Story #8501: As a user, I have new pulp workers that do not require a resource managerCLOSED - CURRENTRELEASEmdellweg

Actions

Also available in: Atom PDF