feat(captain): queue document syncs

This commit is contained in:
2026-06-05 17:51:49 +08:00
parent 7ae38d020d
commit 24b9f02be0
6 changed files with 145 additions and 6 deletions
@@ -194,7 +194,7 @@ func (h *CaptainDocumentHandler) SyncDocument(c *gin.Context) {
return
}
if _, err := h.svc.MarkSyncing(c.Request.Context(), accountID, id); err != nil {
if _, err := h.svc.RequestSyncDocumentByAccount(c.Request.Context(), accountID, id); err != nil {
applogger.L().Errorf("SyncDocument: %v", err)
response.AbortWithStatusError(c, captainAssistantErrorStatus(err), response.ErrInternal, "failed to sync document")
return