Commit 2c2f83cb authored by Romain Courteaud's avatar Romain Courteaud

slapos_upgrader: reduce concurrency on instance tree creation

parent b2f5290c
......@@ -34,6 +34,7 @@ portal.portal_catalog.searchAndActivate(
############################################
portal.portal_catalog.searchAndActivate(
method_id='InstanceTree_fixupSiteMigrationToVirtualMaster',
method_kw={'tag': tag},
activate_kw={'tag': tag, 'priority': 1},
portal_type="Instance Tree",
......
......@@ -25,4 +25,8 @@ for sql_result in portal.portal_catalog(specialise__uid=instance_tree.getUid()):
if not is_consistent:
for instance_virtual_master_relative_url in remote_virtual_master_dict:
instance_tree_virtual_master.Project_checkSiteMigrationCreateRemoteNode(instance_virtual_master_relative_url, remote_virtual_master_dict[instance_virtual_master_relative_url])
instance_tree_virtual_master.Project_checkSiteMigrationCreateRemoteNode(
instance_virtual_master_relative_url,
remote_virtual_master_dict[instance_virtual_master_relative_url],
activate_kw={'tag': tag, 'serialization_tag': tag, 'limit': 1}
)
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>REQUEST=None</string> </value>
<value> <string>tag=None, REQUEST=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -58,4 +58,4 @@ if remote_node is None:
# XXX Then, migrate other documents linked to the virtual master
for relative_url_to_migrate in relative_url_to_migrate_list:
object_to_migrate = portal.restrictedTraverse(relative_url_to_migrate)
object_to_migrate.activate().Instance_activateMigrationToRemoteProject(remote_node.getRelativeUrl())
object_to_migrate.activate(**activate_kw).Instance_activateMigrationToRemoteProject(remote_node.getRelativeUrl())
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>remote_project_relative_url, relative_url_to_migrate_list, REQUEST=None, tag=None, *args, **kw</string> </value>
<value> <string>remote_project_relative_url, relative_url_to_migrate_list, REQUEST=None, tag=None, activate_kw=None, *args, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment