-
Sub-task
-
Resolution: Done
-
Undefined
-
None
-
None
-
1
-
False
-
None
-
False
-
-
Before we can better track the status of pipeline processing we need to add the new relevant fields to track and manage these new statuses.
CostUsageReportStatus model should include the following for tracking:
STATUS_FAILED = 1
STATUS_DOWNLOADING = 2
STATUS_CONVERTING = 3
STATUS_DONE = 4
STATUS_UPLOADING = 5
STATUS_CHOICES = (
(STATUS_DOWNLOADING, 'Downloading'),
(STATUS_CONVERTING, 'Converting'),
(STATUS_DONE, 'Done'),
(STATUS_FAILED, 'Failed'),
(STATUS_UPLOADING, 'Uploading'),
)
FAILED_STATUS_CHOICES = (
(STATUS_DOWNLOADING, 'Downloading'),
(STATUS_CONVERTING, 'Converting'),
(STATUS_UPLOADING, 'Uploading'),
)
celery_task_id = models.UUIDField()
status = models.IntegerField(choices=STATUS_CHOICES, default=STATUS_DOWNLOADING)
failed_status = models.IntegerField(choices=FAILED_STATUS_CHOICES, null=True)
The CostUsageReportManifest model should include a new state field:
state = models.JSONField(default=dict, null=True)
Example of data:
"""
{ "download": \{"start" time, "end": time, "time_taken": end-start}
,
"summarization": {"start" time, "end": time, "time_taken": end-start},
""
"ocp-on-cloud-summarization"
""
}
"""