New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement master/detail tasks #61
Conversation
By using DRF to create tasks, we can rely on the serializer validation rather than doing it with the viewset.
|
||
|
||
log = getLogger(__name__) | ||
|
||
|
||
class FileTask(Task): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a real type of task. It just allows the plugin writers to view v3/tasks/file/ that include all of them (sync, publish, etc). This type of task won't ever be created because the FileTaskViewSet does not have the create mixin.
queryset=Repository.objects.all(), | ||
) | ||
|
||
reservation_structure = ["repository", "importer"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used by pulpcore to create reserved tasks.
reservation_structure = ["repository", "importer"] | ||
task_kwarg_structure = {'importer_pk': "importer.pk", | ||
'repository_pk': "repository.pk"} | ||
celery_task = tasks.synchronize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can deploy plugin defined tasks like it does here, or it could deploy core defined tasks. Add/Remove seems like a good candidate for a core defined task that would work for some simple plugins.
Closing for now, this branch has gotten really out of date. I'll reopen if it becomes relevant for discussion again. |
No description provided.