worker: make Enqueue() specific for each job type

Most of the worker API is now untyped, but keep Enqueu() typed to
ensure the job objects match the names in the queue. This means we
must add a version of Enqueue() for each job type we support.
This commit is contained in:
Tom Gundersen 2020-11-08 22:12:30 +00:00 committed by Lars Karlitski
parent 79f87ea347
commit 98fd290a08
7 changed files with 27 additions and 14 deletions

View file

@ -188,7 +188,7 @@ func (server *Server) Compose(w http.ResponseWriter, r *http.Request) {
return
}
id, err := server.workers.Enqueue(ir.arch, &worker.OSBuildJob{
id, err := server.workers.EnqueueOSBuild(ir.arch, &worker.OSBuildJob{
Manifest: ir.manifest,
Targets: targets,
})