Initial commit: omnichannel-mcp — MCP-сервер управления платформой Omnichannel
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user