store: pass the store to the jobqueue API
Drop the jobUpdates channel, and instead add an UpdateCompose method to the store, which updates the status of a compose directly. This allows us to report back errors directly, rather than having to mirror the staet in the jobqueue API. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
89fd2e6037
commit
3ff4f59fc7
5 changed files with 34 additions and 39 deletions
|
|
@ -13,6 +13,7 @@ import (
|
|||
"osbuild-composer/internal/job"
|
||||
"osbuild-composer/internal/jobqueue"
|
||||
"osbuild-composer/internal/pipeline"
|
||||
"osbuild-composer/internal/store"
|
||||
"osbuild-composer/internal/target"
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
|
@ -90,8 +91,7 @@ func TestBasic(t *testing.T) {
|
|||
}
|
||||
|
||||
jobChannel := make(chan job.Job, 100)
|
||||
statusChannel := make(chan job.Status, 100)
|
||||
api := jobqueue.New(nil, jobChannel, statusChannel)
|
||||
api := jobqueue.New(nil, store.New(nil, nil, jobChannel), jobChannel)
|
||||
for _, c := range cases {
|
||||
id, _ := uuid.Parse("ffffffff-ffff-ffff-ffff-ffffffffffff")
|
||||
p := &pipeline.Pipeline{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue