feat(worker): lab5 add retries, DLQ registry and manual replay endpoint

This commit is contained in:
Голиков Maximillian Антон
2026-11-10 19:08:15 +03:00
parent dce767a156
commit f748c09e10
7 changed files with 84 additions and 0 deletions
@@ -92,3 +92,20 @@ func (h *AttachmentHandler) Content(c *gin.Context) {
c.DataFromReader(http.StatusOK, size, contentType, rc, nil)
}
func (h *AttachmentHandler) Replay(c *gin.Context) {
me := middleware.CurrentUser(c)
attachmentID, err := parseUUIDPathParam(c, "attachment_id")
if err != nil {
respondError(c, err)
return
}
if err := h.svc.Replay(c.Request.Context(), me.ID, attachmentID); err != nil {
respondError(c, err)
return
}
c.Status(http.StatusAccepted)
}