worker/server: job status struct

The number of return values from the `jobStatus`
function was growing and getting out of hand. Not
all return values were being used in all cases
and so returning a single struct with the information
and status of a job makes more sense. Then in each case
the resulting fields can be used as needed.
This commit is contained in:
Gianluca Zuccarelli 2022-07-22 13:18:47 +01:00 committed by Tomáš Hozza
parent 9f4e765657
commit 967ac1c35e
7 changed files with 128 additions and 115 deletions

View file

@ -292,7 +292,7 @@ func generateManifest(ctx context.Context, workers *worker.Server, depsolveJobID
return
}
_, _, err = workers.DepsolveJobStatus(depsolveJobID, &depsolveResults)
_, err = workers.DepsolveJobStatus(depsolveJobID, &depsolveResults)
if err != nil {
reason := "Error reading depsolve status"
jobResult.JobError = clienterrors.WorkerClientError(clienterrors.ErrorReadingJobStatus, reason)