Project

Profile

Help

Issue #3103

closed

Missing representation of spawned_tasks in response

Added by kersom about 7 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 27
Quarter:

Description

TaskViewSet to have spawned_tasks representation even if it is an empty list.

Current response:

"results": [{
  "_href": "http://pulp3.dev:8000/api/v3/tasks/e99435f5-0ba4-4ccf-bb66-60a1bd120ae1/",
  "group": null,
  "state": "completed",
  "started_at": "2017-10-20T18:37:47.630237Z",
  "finished_at": "2017-10-20T18:37:47.684939Z",
  "non_fatal_errors": [],
  "error": null,
  "worker": "http://pulp3.dev:8000/api/v3/workers/reserved_resource_worker_2@pulp3.dev/",
  "parent": null,
  "tags": [],
  "progress_reports": []
}]

Code on github.

 parent = models.ForeignKey("Task", null=True, related_name="spawned_tasks")

Link to code.

https://github.com/bmbouter/pulp/blob/e5986173d1617fcadb520c84b78691982cce2218/platform/pulpcore/app/models/task.py#L163

Also available in: Atom PDF