forked from vieter-v/vieter
feat: simplified config down to pkg_dir & data_dir
BREAKING: downloads are now stored inside the root of pkg_dir, the log file is always stored in the root of data_dir
This commit is contained in:
parent
7419144f97
commit
c818273790
8 changed files with 31 additions and 28 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue