Add Cron interval to config
This commit is contained in:
parent
f52fe6abf3
commit
52dbfbf56e
6 changed files with 21 additions and 6 deletions
|
|
@ -6,6 +6,7 @@ import (
|
|||
"net/url"
|
||||
"reflect"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Config represents the configuration of a WissKI Distillery.
|
||||
|
|
@ -89,6 +90,9 @@ type Config struct {
|
|||
// name of docker network to use
|
||||
DockerNetworkName string `env:"DOCKER_NETWORK_NAME" default:"distillery" parser:"nonempty"`
|
||||
|
||||
// interval to trigger distillery cron tasks in
|
||||
CronInterval time.Duration `env:"CRON_INTERVAL" default:"10m" parser:"duration"`
|
||||
|
||||
// ConfigPath is the path this configuration was loaded from (if any)
|
||||
ConfigPath string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,3 +76,6 @@ KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD}
|
|||
# The admin user and password required to access the /dis/ server and api
|
||||
DIS_ADMIN_USER=${DIS_ADMIN_USER}
|
||||
DIS_ADMIN_PASSWORD=${DIS_ADMIN_PASSWORD}
|
||||
|
||||
# the interval to run cron in
|
||||
CRON_INTERVAL=10m
|
||||
Loading…
Add table
Add a link
Reference in a new issue