Initial commit: omnichannel-mcp — MCP-сервер управления платформой Omnichannel
ci / test (push) Successful in 2m22s
ci / lint (push) Successful in 4m31s

This commit is contained in:
Maksim Totmin
2026-10-07 20:13:23 +07:00
commit fdbd4a4fb6
54 changed files with 5672 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package configserver
import "context"
// api_maintain.go — обслуживание: очистка старых версий.
// CleanupOldVersions удаляет версии compose/env и логи миграций старше days дней
// (текущие версии не трогаются).
func (a *API) CleanupOldVersions(ctx context.Context, days int) (*CleanupAck, error) {
ctx, cancel := a.withTimeout(ctx)
defer cancel()
body := map[string]int{"days": days}
out := &CleanupAck{}
if err := a.Sess.postJSON(ctx, "/api/cleanup_old_versions", body, out); err != nil {
return nil, err
}
return out, nil
}