mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-04 10:13:53 +08:00
fix: cancel deploy error
This commit is contained in:
@@ -4,8 +4,6 @@ go 1.23.4
|
||||
|
||||
toolchain go1.23.6
|
||||
|
||||
//toolchain go1.21.1
|
||||
|
||||
require (
|
||||
github.com/eolinker/ap-account v1.0.15
|
||||
github.com/eolinker/eosc v0.18.3
|
||||
@@ -83,6 +81,7 @@ require (
|
||||
// github.com/eolinker/eosc => ../../eolinker/eosc
|
||||
//)
|
||||
|
||||
//replace github.com/eolinker/ap-account => ../aoaccount
|
||||
//replace github.com/eolinker/ap-account => ../../eolinker/ap-account
|
||||
|
||||
//
|
||||
//replace github.com/eolinker/go-common => ../../eolinker/go-common
|
||||
|
||||
@@ -354,6 +354,15 @@ func (i *imlLocalModel) SaveCache(ctx context.Context, model string, target stri
|
||||
|
||||
func (i *imlLocalModel) CancelDeploy(ctx context.Context, model string) error {
|
||||
return i.transaction.Transaction(ctx, func(txCtx context.Context) error {
|
||||
item, err := i.localModelCacheService.GetByTarget(ctx, ai_local.CacheTypeService, model)
|
||||
if err != nil {
|
||||
if !errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
return err
|
||||
}
|
||||
|
||||
} else {
|
||||
model = item.Model
|
||||
}
|
||||
list, err := i.localModelCacheService.List(ctx, model, ai_local.CacheTypeService)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user