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:
Tom Gundersen 2020-08-15 21:07:51 +02:00 committed by Lars Karlitski
parent e72b14bdd1
commit e277501ca3
5 changed files with 37 additions and 29 deletions

View file

@ -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
}