jobqueue/JobStatus: return result as json.RawMessage
Similarly to the recent changes to Dequeue(), let the caller unmarshal the return JSON. This allows us to pass the result on without being able to unmarshal it. In follow-up patches, we will pass results of jobs to dependent jobs, but the worker API does not know about the different job types, nor how to unmarshal them.
This commit is contained in:
parent
e277501ca3
commit
11d0da0b5c
6 changed files with 34 additions and 28 deletions
|
|
@ -247,8 +247,10 @@ func (api *API) getComposeStatus(compose store.Compose) *composeStatus {
|
|||
// All jobs are "osbuild" jobs.
|
||||
var result worker.OSBuildJobResult
|
||||
|
||||
// is it ok to ignore this error?
|
||||
jobStatus, _ := api.workers.JobStatus(jobId, &result)
|
||||
jobStatus, _, err := api.workers.JobStatus(jobId, &result)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return &composeStatus{
|
||||
State: composeStateFromJobStatus(jobStatus, &result),
|
||||
Queued: jobStatus.Queued,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue