Skip to content

Commit

Permalink
go: Read env MODEL_NAME
Browse files Browse the repository at this point in the history
Signed-off-by: YouXam <[email protected]>
  • Loading branch information
YouXam committed Jul 17, 2024
1 parent f8007c6 commit 7452c76
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion WorkerNodeGo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/apache/pulsar-client-go/pulsar"
)

const MODEL_NAME = "static"
var MODEL_NAME = "static"

var PULSAR_URL string
var MAX_PROCESS_NUM int
Expand All @@ -24,6 +24,10 @@ var LOCK sync.Mutex
var LOCK_CHAN = make(chan int, 1)

func init() {
if v, ok := os.LookupEnv("MODEL_NAME"); ok {
MODEL_NAME = v
}

if v, ok := os.LookupEnv("PULSAR_URL"); ok {
PULSAR_URL = v
} else {
Expand Down

0 comments on commit 7452c76

Please sign in to comment.