Project

Profile

Help

Refactor #2658

closed

Update Pulp's apply_async function signature to conform with Celery's

Added by bizhang about 7 years ago. Updated over 4 years ago.

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

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 20
Quarter:

Description

Currently pulp's apply_async function signature[0] does not explicitly match Celery's [1]
This has caused some confusion over what to pass to Pulp's apply_async [2]

Refactoring our apply_async signature to take in the keyword arguments 'args' and 'kwargs' may be ugly, but it does explicitly state that these are the arguments that Celery passes to a task. It also allows us to distinguish between the arguments for celery, and the arguments for our task.

We should also document how to kick off Pulp3 apply_async and apply_async_with_reservations tasks in a blog post

[0] https://github.com/pulp/pulp/blob/3.0-dev/tasking/pulp/tasking/tasks.py#L211
[1] http://docs.celeryproject.org/en/latest/reference/celery.app.task.html#celery.app.task.Task.apply_async
[2] https://github.com/pulp/pulp/pull/2971

Also available in: Atom PDF