batchstore: set result to status message on failure
On failure, result is empty and only status carries the error. Callers (subagent_spawn, oq) now always have a useful value in result regardless of success or failure.
This commit is contained in:
parent
181e629009
commit
e277937619
|
|
@ -224,6 +224,7 @@ func (s *BatchStore) runJob(ctx context.Context, job *batchJob) {
|
||||||
} else {
|
} else {
|
||||||
job.status = "failed: " + err.Error()
|
job.status = "failed: " + err.Error()
|
||||||
}
|
}
|
||||||
|
job.result = job.status
|
||||||
plog.Info("batch job %s failed: %v", job.id, err)
|
plog.Info("batch job %s failed: %v", job.id, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in New Issue