Сделать отправку сообщения идемпотентной по Idempotency-Key с общей таблицей ключей и их чисткой

This commit is contained in:
2026-11-02 17:11:04 +03:00
parent 7fa8881eb3
commit 951fd0d517
19 changed files with 856 additions and 40 deletions
+1 -2
View File
@@ -174,8 +174,7 @@ func sendConcurrently(baseURL, chatID string, tokens []string, perClient int) (m
<-start
for m := range perClient {
var msg chat.MessageResponse
body := map[string]string{"text": fmt.Sprintf("client %d message %d", n, m)}
err := own.post("/api/v1/chats/"+chatID+"/messages", token, body, &msg)
err := own.postMessage(chatID, token, fmt.Sprintf("client %d message %d", n, m), &msg)
mu.Lock()
if err != nil {
failed++