fsjobqueue: pass accepted job types to New()

This makes the queue more type safe and allows to get rid of the
`pendingChannel` and `pendingChannels` helpers, which only existed to
create not-yet-existing pending channels.
This commit is contained in:
Lars Karlitski 2020-05-10 18:17:05 +02:00 committed by Tom Gundersen
parent 3240f11647
commit 8df143fabe
3 changed files with 33 additions and 43 deletions

View file

@ -125,7 +125,7 @@ func main() {
log.Fatalf("cannot create queue directory: %v", err)
}
jobs, err := fsjobqueue.New(queueDir)
jobs, err := fsjobqueue.New(queueDir, []string{"osbuild"})
if err != nil {
log.Fatalf("cannot create jobqueue: %v", err)
}