jobqueue: return dependencies on dequeue
Once a job has been enqueued, there is no way to query its dependencies. This makes dequeue more symmetric to enqueue by returning the dependencies that were passed to enqueue, allowing the caller to query the dependencies and their results. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
e72b14bdd1
commit
e277501ca3
5 changed files with 37 additions and 29 deletions
|
|
@ -175,7 +175,7 @@ func (s *Server) RequestJob(ctx context.Context, arch string, jobTypes []string)
|
|||
jts = append(jts, t)
|
||||
}
|
||||
|
||||
jobId, jobType, args, err := s.jobs.Dequeue(ctx, jts)
|
||||
jobId, _, jobType, args, err := s.jobs.Dequeue(ctx, jts)
|
||||
if err != nil {
|
||||
return uuid.Nil, uuid.Nil, "", nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue