fix(region,host): isolated device batch sync (#20536)

This commit is contained in:
wanyaoqi
2024-06-14 19:39:45 +08:00
committed by GitHub
parent 3cab927394
commit 7d7ca5bdc4
5 changed files with 115 additions and 19 deletions
+7
View File
@@ -1767,6 +1767,13 @@ func reflectDispatcherInternal(
}
}
func DoUpdate(manager IModelManager, item IModel, ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error) {
lockman.LockObject(ctx, item)
defer lockman.ReleaseObject(ctx, item)
return updateItem(manager, item, ctx, userCred, query, data)
}
func updateItem(manager IModelManager, item IModel, ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error) {
var err error