Return JobResult

This commit is contained in:
Ettore Di Giacinto
2024-04-03 23:17:46 +02:00
parent 9df690999c
commit 936b2af4ca
4 changed files with 32 additions and 26 deletions

View File

@@ -105,9 +105,9 @@ func (j *JobResult) Finish(e error) {
}
// WaitResult waits for the result of a job
func (j *JobResult) WaitResult() []ActionState {
func (j *JobResult) WaitResult() *JobResult {
<-j.ready
j.Lock()
defer j.Unlock()
return j.State
return j
}