Commit 649e3d00 authored by Rafael Monnerat's avatar Rafael Monnerat

Reduce administrator actions to upgrade master

See merge request !537
parents 19f4a9a5 c5204244
template_tool = context.getPortalObject().portal_templates portal = context.getPortalObject()
template_tool = portal.portal_templates
template_tool.updateRepositoryBusinessTemplateList( template_tool.updateRepositoryBusinessTemplateList(
template_tool.getRepositoryList()) template_tool.getRepositoryList())
...@@ -13,3 +14,16 @@ method_kw = {'bt5_list': ['erp5_core'], ...@@ -13,3 +14,16 @@ method_kw = {'bt5_list': ['erp5_core'],
template_tool.upgradeSite(**method_kw) template_tool.upgradeSite(**method_kw)
if skip_upgrader:
return "Skipped to upgrade slapos_upgrader"
# Use activities to ensure that it done on another transaction
tag = "upgrader:ERP5Site_upgradeUpgraderBusinessTemplate"
template_tool.activate(
tag=tag).ERP5Site_upgradeUpgraderBusinessTemplate()
if skip_alarm:
return "Skipped to call portal_alarms.promise_check_upgrade.activeSense"
portal.portal_alarms.promise_check_upgrade.activate(
tag="upgrader:promise_check_upgrade", after_tag=tag).activeSense()
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string>skip_upgrader=None, skip_alarm=None</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <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