feat: add non-functional build timeout setting

This commit is contained in:
Jef Roosens 2023-05-02 11:46:19 +02:00
parent 8a76860363
commit ac3a89500b
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
8 changed files with 34 additions and 21 deletions

View file

@ -5,17 +5,18 @@ import conf as vconf
struct Config {
pub:
port int = 8000
log_level string = 'WARN'
pkg_dir string
data_dir string
api_key string
default_arch string
global_schedule string = '0 3'
base_image string = 'archlinux:base-devel'
max_log_age int [empty_default]
log_removal_schedule string = '0 0'
collect_metrics bool [empty_default]
port int = 8000
log_level string = 'WARN'
pkg_dir string
data_dir string
api_key string
default_arch string
global_schedule string = '0 3'
base_image string = 'archlinux:base-devel'
max_log_age int [empty_default]
log_removal_schedule string = '0 0'
collect_metrics bool [empty_default]
default_build_timeout int = 60
}
// cmd returns the cli submodule that handles starting the server

View file

@ -108,7 +108,7 @@ pub fn server(conf Config) ! {
repo: repo_
db: db
collector: collector
job_queue: build.new_job_queue(global_ce, conf.base_image)
job_queue: build.new_job_queue(global_ce, conf.base_image, conf.default_build_timeout)
}
app.init_job_queue() or {
util.exit_with_message(1, 'Failed to inialize job queue: ${err.msg()}')