Skip to content

Commit

Permalink
Add disable mechanism for jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
harture committed Nov 14, 2018
1 parent ad7248e commit d3d629f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/keycloakb/keycloak_bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ func main() {
keycloakEnabled = c.GetBool("keycloak")
redisEnabled = c.GetBool("redis")
sentryEnabled = c.GetBool("sentry")
jobEnabled = c.GetBool("job")
pprofRouteEnabled = c.GetBool("pprof-route-enabled")

// Influx
Expand Down Expand Up @@ -581,7 +582,7 @@ func main() {
}

// Jobs
{
if jobEnabled {
var ctrl = controller.NewController(ComponentName, ComponentID, idgenerator.New(flakiClient, tracer), &job_lock.NoopLocker{}, controller.EnableStatusStorage(job_status.New(cockroachConn)))

for _, job := range []string{"cockroach", "elasticsearch", "flaki", "influx", "jaeger", "keycloak", "redis", "sentry"} {
Expand Down Expand Up @@ -842,6 +843,7 @@ func config(logger log.Logger) *viper.Viper {
v.SetDefault("cockroach-clean-interval", "24h")

// Jobs
v.SetDefault("job", false)
v.SetDefault("job-flaki-health-validity", "1m")
v.SetDefault("job-influx-health-validity", "1m")
v.SetDefault("job-jaeger-health-validity", "1m")
Expand Down
1 change: 1 addition & 0 deletions configs/keycloak_bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jaeger-collector-healthcheck-host-port:
pprof-route-enabled: true

# Jobs
job: false
job-es-health-validity: 1m
job-flaki-health-validity: 1m
job-influx-health-validity: 1m
Expand Down

0 comments on commit d3d629f

Please sign in to comment.