worker: allow passing different jobs to workers

Until now, all jobs were put as "osbuild" jobs into the job queue and
the worker API hard-coded sending an osbuild manifest and upload
targets.

Change the API to take a "type" and "args" keys, which are equivalent to
the job-queue's type and args. Workers continue to support only osbuild
jobs, but this makes other jobs possible in the future.
This commit is contained in:
Lars Karlitski 2020-09-20 17:22:31 +02:00 committed by Tom Gundersen
parent 5b57814664
commit d3c99b8e93
5 changed files with 39 additions and 20 deletions

View file

@ -49,19 +49,20 @@ paths:
type: object
additionalProperties: false
properties:
manifest: {}
targets:
type: array
items: {}
id:
type: string
format: uuid
location:
type: string
artifact_location:
type: string
id:
type:
type: string
format: uuid
enum:
- osbuild
args: {}
required:
- manifest
- type
- location
- id
4XX: