cmd/cli: write new config file on reload

This commit is contained in:
Cuong Manh Le
2024-07-29 23:05:49 +07:00
committed by Cuong Manh Le
parent 12d6484b1c
commit c233ad9b1b
7 changed files with 20 additions and 11 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ var statsClientQueriesCount = prometheus.NewCounterVec(prometheus.CounterOpts{
// WithLabelValuesInc increases prometheus counter by 1 if query stats is enabled.
func (p *prog) WithLabelValuesInc(c *prometheus.CounterVec, lvs ...string) {
if p.cfg.Service.MetricsQueryStats {
if p.metricsQueryStats.Load() {
c.WithLabelValues(lvs...).Inc()
}
}