Add simple osbuild-worker

It doesn't actually build anything yet, but talks to the queue API.
This commit is contained in:
Lars Karlitski 2019-09-26 23:58:03 +02:00
parent 0bdd3a5c89
commit cfe89eaed5
5 changed files with 125 additions and 2 deletions

View file

@ -108,8 +108,8 @@ func (api *API) addJobHandler(writer http.ResponseWriter, request *http.Request,
nextJob := <-api.pendingJobs
api.jobStore.UpdateJob(id, nextJob)
writer.WriteHeader(http.StatusCreated)
json.NewEncoder(writer).Encode(replyBody{nextJob.Pipeline, nextJob.Targets})
}
func (api *API) updateJobHandler(writer http.ResponseWriter, request *http.Request, params httprouter.Params) {