remove log_file setting from cron
parent
e840d930e1
commit
fda7063f2f
|
|
@ -6,9 +6,9 @@ import env
|
|||
struct Config {
|
||||
pub:
|
||||
log_level string = 'WARN'
|
||||
log_file string = 'vieter.log'
|
||||
api_key string
|
||||
address string
|
||||
data_dir string
|
||||
base_image string = 'archlinux:base-devel'
|
||||
max_concurrent_builds int = 1
|
||||
api_update_frequency int = 15
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@ module cron
|
|||
import log
|
||||
import cron.daemon
|
||||
import cron.expression
|
||||
import os
|
||||
|
||||
const log_file_name = 'vieter.cron.log'
|
||||
|
||||
// cron starts a cron daemon & starts periodically scheduling builds.
|
||||
pub fn cron(conf Config) ? {
|
||||
|
|
@ -15,7 +18,8 @@ pub fn cron(conf Config) ? {
|
|||
level: log_level
|
||||
}
|
||||
|
||||
logger.set_full_logpath(conf.log_file)
|
||||
log_file := os.join_path_single(conf.data_dir, cron.log_file_name)
|
||||
logger.set_full_logpath(log_file)
|
||||
logger.log_to_console_too()
|
||||
|
||||
ce := expression.parse_expression(conf.global_schedule) or {
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@ import time
|
|||
import sync.stdatomic
|
||||
import build
|
||||
|
||||
const build_empty = 0
|
||||
|
||||
const build_running = 1
|
||||
|
||||
const build_done = 2
|
||||
const (
|
||||
build_empty = 0
|
||||
build_running = 1
|
||||
build_done = 2
|
||||
)
|
||||
|
||||
// clean_finished_builds removes finished builds from the build slots & returns
|
||||
// them.
|
||||
|
|
|
|||
Reference in New Issue