worker/RequestJob: treat 'osbuild-koji' jobs like 'osbuild' ones
We must special-case the treatment of architecture, to select the correct remote worker for any job that requires a specific architecture. For now this means any jobs that run osbuild.
This commit is contained in:
parent
0e382e9cf4
commit
79f87ea347
1 changed files with 4 additions and 2 deletions
|
|
@ -176,8 +176,8 @@ func (s *Server) RequestJob(ctx context.Context, arch string, jobTypes []string)
|
||||||
// restriction: arch for osbuild jobs.
|
// restriction: arch for osbuild jobs.
|
||||||
jts := []string{}
|
jts := []string{}
|
||||||
for _, t := range jobTypes {
|
for _, t := range jobTypes {
|
||||||
if t == "osbuild" {
|
if t == "osbuild" || t == "osbuild-koji" {
|
||||||
t = "osbuild:" + arch
|
t = t + ":" + arch
|
||||||
}
|
}
|
||||||
jts = append(jts, t)
|
jts = append(jts, t)
|
||||||
}
|
}
|
||||||
|
|
@ -206,6 +206,8 @@ func (s *Server) RequestJob(ctx context.Context, arch string, jobTypes []string)
|
||||||
|
|
||||||
if jobType == "osbuild:"+arch {
|
if jobType == "osbuild:"+arch {
|
||||||
jobType = "osbuild"
|
jobType = "osbuild"
|
||||||
|
} else if jobType == "osbuild-koji:"+arch {
|
||||||
|
jobType = "osbuild-koji"
|
||||||
}
|
}
|
||||||
|
|
||||||
return token, jobId, jobType, args, dynamicArgs, nil
|
return token, jobId, jobType, args, dynamicArgs, nil
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue