forked from vieter-v/vieter
refactor: migrated env code to own external module
This commit is contained in:
parent
4866cfa635
commit
44696fc11b
8 changed files with 24 additions and 124 deletions
|
|
@ -1,7 +1,7 @@
|
|||
module cron
|
||||
|
||||
import cli
|
||||
import env
|
||||
import vieter.vconf
|
||||
|
||||
struct Config {
|
||||
pub:
|
||||
|
|
@ -24,7 +24,7 @@ pub fn cmd() cli.Command {
|
|||
description: 'Start the cron service that periodically runs builds.'
|
||||
execute: fn (cmd cli.Command) ? {
|
||||
config_file := cmd.flags.get_string('config-file')?
|
||||
conf := env.load<Config>(config_file)?
|
||||
conf := vconf.load<Config>(default_path: config_file)?
|
||||
|
||||
cron(conf)?
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue