3
0

Add ability to disable script runner calls

With script runner disabled, all critical scripts would fail
This commit is contained in:
Denis Arh
2019-07-31 16:46:10 +02:00
parent ecc73e10fc
commit 94e2acfc17
2 changed files with 23 additions and 2 deletions
+2
View File
@@ -6,6 +6,7 @@ import (
type (
ScriptRunnerOpt struct {
Enabled bool `env:"SCRIPT_RUNNER_ENABLED"`
Addr string `env:"SCRIPT_RUNNER_ADDR"`
MaxBackoffDelay time.Duration `env:"SCRIPT_RUNNER_MAX_BACKOFF_DELAY"`
Log bool `env:"SCRIPT_RUNNER_LOG"`
@@ -14,6 +15,7 @@ type (
func ScriptRunner(pfix string) (o *ScriptRunnerOpt) {
o = &ScriptRunnerOpt{
Enabled: false,
Addr: "corredor:80",
MaxBackoffDelay: time.Minute,
Log: false,