Files
zeekay 2899aeaa9f feat: merge agents control plane + SDKs into unified agent repo
Consolidate all Hanzo agent infrastructure into one repo:
- control-plane/: Go control plane server (was agents-new)
- sdk/: Go, Python, TypeScript SDKs
- deployments/: Docker, Kubernetes, Helm configs
- Dockerfile.sdk: Python SDK image (ghcr.io/hanzoai/agent:latest)
- CI builds both SDK + control-plane images

No more agentfield — everything is hanzoai/agent.
2026-02-13 12:24:31 -08:00

27 lines
518 B
Go

package storage
import (
"database/sql"
"errors"
"github.com/hanzoai/agents/control-plane/internal/logger"
)
type rollbacker interface {
Rollback() error
}
// rollbackTx attempts to rollback the transaction and logs a warning when the rollback fails.
func rollbackTx(tx rollbacker, context string) {
if tx == nil {
return
}
if err := tx.Rollback(); err != nil && !errors.Is(err, sql.ErrTxDone) {
logger.Logger.Warn().
Err(err).
Str("context", context).
Msg("transaction rollback failed")
}
}