update: HTTP API

This commit is contained in:
Oarkflow
2025-05-11 11:14:21 +05:45
parent 4ce78c4848
commit 95c49328f6
2 changed files with 19 additions and 128 deletions

View File

@@ -5,8 +5,6 @@ import (
"log"
"runtime"
"runtime/debug"
"github.com/oarkflow/mq/metrics"
)
func RecoverPanic(labelGenerator func() string) {
@@ -20,8 +18,6 @@ func RecoverPanic(labelGenerator func() string) {
}
}
log.Printf("[PANIC] - recovered from panic in %s (%s:%d): %v\nStack trace: %s", funcName, file, line, r, debug.Stack())
label := labelGenerator()
metrics.TasksErrors.WithLabelValues(label).Inc()
}
}