feat(billing): add queue_name column to usage records

This commit is contained in:
Naeel
2026-04-12 11:56:53 +03:00
parent 1272388673
commit aade320400
2 changed files with 15 additions and 4 deletions
+6 -1
View File
@@ -139,7 +139,12 @@ func actionHandler(w http.ResponseWriter, req *http.Request) {
if msgBytes < 0 {
msgBytes = 0
}
billing.RecordUsage(t.ID, action, 1, msgBytes)
// Извлекаем имя очереди: из URL path vars или из form-параметра QueueName (CreateQueue)
queueName := mux.Vars(req)["queueName"]
if queueName == "" {
queueName = req.FormValue("QueueName")
}
billing.RecordUsage(t.ID, action, queueName, 1, msgBytes)
}
}
return