From 4d3a1c2aed1df46aedd301a689dae8a8924adf6f Mon Sep 17 00:00:00 2001 From: Cyril Galibern Date: Sat, 7 Feb 2026 14:24:50 +0100 Subject: [PATCH] [worker] Migrate config key from `feeder.tx` to `worker.tx` for transaction control --- cmd/conf.go | 2 +- cmd/worker.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/conf.go b/cmd/conf.go index b3bb0d4..11b85e2 100644 --- a/cmd/conf.go +++ b/cmd/conf.go @@ -47,7 +47,6 @@ func initConfig() error { viper.SetDefault("redis.db", 0) viper.SetDefault("redis.address", "localhost:6379") viper.SetDefault("redis.password", "") - viper.SetDefault("feeder.tx", true) viper.SetDefault("messenger.key", "magix123") viper.SetDefault("messenger.url", "http://127.0.0.1:8889") viper.SetDefault("messenger.require_token", false) @@ -56,6 +55,7 @@ func initConfig() error { viper.SetDefault("worker.runners", 1) viper.SetDefault("worker.pprof.uxsocket", "/var/run/oc3_worker_pprof.sock") //viper.SetDefault("worker.pprof.addr", "127.0.0.1:9999") + viper.SetDefault("worker.tx", true) viper.SetDefault("worker.pprof.enable", false) viper.SetDefault("worker.metrics.enable", false) viper.SetDefault("worker.metrics.addr", "127.0.0.1:2112") diff --git a/cmd/worker.go b/cmd/worker.go index 173c0e9..8bef2ba 100644 --- a/cmd/worker.go +++ b/cmd/worker.go @@ -24,7 +24,7 @@ func startWorker(runners int, queues []string) error { Redis: newRedis(), DB: db, Queues: queues, - WithTx: viper.GetBool("feeder.tx"), + WithTx: viper.GetBool("worker.tx"), Ev: newEv(), Runners: runners, }