fix: default gateway callback batching off
This commit is contained in:
@@ -95,7 +95,7 @@ func main() {
|
||||
resultOutbox.Consumer = getenv("GATEWAY_SUBMIT_RESULT_CONSUMER", "gateway-1")
|
||||
resultOutbox.APIBaseURL = callbackBaseURL
|
||||
resultOutbox.Concurrency = positiveEnvInt("GATEWAY_SUBMIT_RESULT_WORKER_CONCURRENCY", 8)
|
||||
resultOutbox.BatchEnabled = os.Getenv("GATEWAY_CALLBACK_BATCH_ENABLED") != "false"
|
||||
resultOutbox.BatchEnabled = enabledEnv("GATEWAY_CALLBACK_BATCH_ENABLED")
|
||||
resultOutbox.BatchSize = positiveEnvInt("GATEWAY_CALLBACK_BATCH_SIZE", 50)
|
||||
resultOutbox.BatchWait = time.Duration(positiveEnvInt("GATEWAY_CALLBACK_BATCH_WAIT_MS", 10)) * time.Millisecond
|
||||
resultOutbox.GatewayInstanceID = gatewayInstanceID
|
||||
@@ -234,6 +234,10 @@ func positiveEnvInt(key string, fallback int) int {
|
||||
return value
|
||||
}
|
||||
|
||||
func enabledEnv(key string) bool {
|
||||
return os.Getenv(key) == "true"
|
||||
}
|
||||
|
||||
func hostname() string {
|
||||
name, err := os.Hostname()
|
||||
if err != nil || name == "" {
|
||||
|
||||
Reference in New Issue
Block a user