fsjobqueue: accept jobs of any type

Soon, we want to begin tagging the jobs with the name of its submitter.
The simplest way to add a tag to a job is to put it into its type string.
However, as we don't know (and don't want to know) the submitters' names when
osbuild-composer is initialized, we need to be able to push arbitrary job
types into the jobqueue.

This commit therefore lifts the restriction that a jobqueue accepts only
a predefined set of job types. Now, jobqueue clients can push jobs of
arbitrary names.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2020-11-11 13:48:23 +01:00 committed by Tom Gundersen
parent e007f9964e
commit a6df2877a3
4 changed files with 30 additions and 36 deletions

View file

@ -31,7 +31,7 @@ func newTestKojiServer(t *testing.T, dir string) (*kojiapi.Server, *worker.Serve
require.NoError(t, err)
require.NotNil(t, distros)
queue, err := fsjobqueue.New(dir, []string{"osbuild:x86_64", "koji-init", "osbuild-koji:x86_64", "koji-finalize"})
queue, err := fsjobqueue.New(dir)
require.NoError(t, err)
workerServer := worker.NewServer(nil, queue, "")