feat(worker): lab5 add retries, DLQ registry and manual replay endpoint
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user