forked from vieter-v/vieter
feat(server): update job queue when adding, removing or updating targets
This commit is contained in:
parent
e742d3de6d
commit
6342789921
2 changed files with 26 additions and 10 deletions
|
|
@ -49,6 +49,13 @@ pub fn new_job_queue(default_schedule CronExpression, default_base_image string)
|
|||
}
|
||||
}
|
||||
|
||||
// insert_all executes insert for each architecture of the given Target.
|
||||
pub fn (mut q BuildJobQueue) insert_all(target Target) ! {
|
||||
for arch in target.arch {
|
||||
q.insert(target, arch.value)!
|
||||
}
|
||||
}
|
||||
|
||||
// insert a new target's job into the queue for the given architecture. This
|
||||
// job will then be endlessly rescheduled after being pop'ed, unless removed
|
||||
// explicitely.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue