mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(arch): add log partitioning and provider delete sync
This commit is contained in:
@@ -86,10 +86,12 @@ func (h *Handler) DeleteProvider(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// Full sync is the simplest safe option because provider deletion needs to remove
|
||||
// stale entries in Redis snapshots (config:providers) and refresh bindings.
|
||||
if err := h.sync.SyncAll(h.db); err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to sync snapshots", "details": err.Error()})
|
||||
if err := h.sync.SyncProviderDelete(&p); err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to sync provider delete", "details": err.Error()})
|
||||
return
|
||||
}
|
||||
if err := h.sync.SyncBindings(h.db); err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to sync bindings", "details": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user