Skip to content

Commit

Permalink
Signed-off-by: tooptoop4 <[email protected]>
Browse files Browse the repository at this point in the history
  • Loading branch information
tooptoop4 authored Nov 6, 2024
1 parent 4742e9d commit 197f3cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions workflow/controller/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package controller

import (
"context"
"errors"
"fmt"
"os"

log "github.com/sirupsen/logrus"
"golang.org/x/time/rate"
Expand Down Expand Up @@ -44,6 +46,9 @@ func (wfc *WorkflowController) updateConfig() error {
wfc.session = session
}
sqldb.ConfigureDBSession(wfc.session, persistence.ConnectionPool)
if os.Getenv("ALWAYS_OFFLOAD_NODE_STATUS") == "true" && !persistence.NodeStatusOffload {
return errors.New("persistence.NodeStatusOffload must be defined when ALWAYS_OFFLOAD_NODE_STATUS is true")
}
if persistence.NodeStatusOffload {
wfc.offloadNodeStatusRepo, err = sqldb.NewOffloadNodeStatusRepo(wfc.session, persistence.GetClusterName(), tableName)
if err != nil {
Expand Down

0 comments on commit 197f3cb

Please sign in to comment.