3
0

Remove old model versions from the dal registry

This commit is contained in:
Tomaž Jerman
2023-06-20 13:39:16 +02:00
parent d2a901d424
commit a830cddabb
+9
View File
@@ -737,6 +737,15 @@ func (svc *service) ReplaceModel(ctx context.Context, model *Model) (err error)
)
}
// Remove the old model from the registry
if oldModel != nil {
svc.removeModelFromRegistry(oldModel)
log.Debug(
"removed old model from registry",
logger.Uint64("connectionID", model.ConnectionID),
)
}
// Add to registry
// @note models should be added to the registry regardless of issues
svc.addModelToRegistry(model, upd)