Commit 02726df6 authored by Łukasz Nowak's avatar Łukasz Nowak

Rebrand building functionality.

Also drop 91761c1a, as in SlapOS deliveries
are not merged together.

Nevertheless 91761c1a introduced serious bug: as root_applied_rule.getPath
was not passed, searchMovementList from builder was returning a lot of
movements in case of system which has this alarm disabled, thus resulting in
enormous transaction per SimulationMovement_build*.

Even worse: passing path and explanation is mutually exclusive, as path is
internally recalculated by explanation.
parent 48717b24
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_buildVifibPath</string> </value>
<value> <string>Alarm_buildSlapOSPath</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -22,7 +22,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>vifib_trigger_build</string> </value>
<value> <string>slapos_trigger_build</string> </value>
</item>
<item>
<key> <string>periodicity_hour</string> </key>
......@@ -89,7 +89,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Vifib Trigger Build</string> </value>
<value> <string>SlapOS Trigger Build</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -60,7 +60,7 @@ kw.update(\n
)\n
\n
context.getPortalObject().portal_catalog.searchAndActivate(\n
method_id=\'SimulationMovement_buildVifib\',\n
method_id=\'SimulationMovement_buildSlapOS\',\n
packet_size=1, # Separate calls to many transactions\n
method_kw={\'tag\': tag},\n
activate_kw={\'tag\': tag},\n
......@@ -78,7 +78,7 @@ context.activate(after_tag=tag).getId()\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_buildVifibPath</string> </value>
<value> <string>Alarm_buildSlapOSPath</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -60,13 +60,13 @@ if context.getDelivery() is not None:\n
return\n
\n
root_applied_rule = context.getRootAppliedRule()\n
root_applied_rule_path = root_applied_rule.getPath()\n
\n
business_link = context.getCausalityValue(portal_type=\'Business Link\')\n
explanation = context.getImmediateExplanationValue()\n
lock_tag = \'build_in_progress_%s_%s\' % (explanation.getUid(), business_link.getUid())\n
lock_tag = \'build_in_progress_%s_%s\' % (business_link.getUid(), root_applied_rule.getUid())\n
if context.getPortalObject().portal_activities.countMessageWithTag(lock_tag) == 0:\n
business_link.build(explanation=explanation, activate_kw={\'tag\': tag})\n
explanation.activate(activity=\'SQLQueue\', after_tag=tag, tag=lock_tag).getId()\n
business_link.build(path=\'%s/%%\' % root_applied_rule_path, activate_kw={\'tag\': tag})\n
root_applied_rule.activate(activity=\'SQLQueue\', after_tag=tag, tag=lock_tag).getId()\n
</string> </value>
</item>
<item>
......@@ -75,7 +75,7 @@ if context.getPortalObject().portal_activities.countMessageWithTag(lock_tag) ==
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SimulationMovement_buildVifib</string> </value>
<value> <string>SimulationMovement_buildSlapOS</string> </value>
</item>
</dictionary>
</pickle>
......
30
\ No newline at end of file
31
\ No newline at end of file
......@@ -19,6 +19,7 @@ open_sale_order_module/template_open_sale_order
organisation_module/slapos
organisation_module/slapos/bank_account
portal_alarms/slapos_request_update_hosting_subscription_open_sale_order
portal_alarms/slapos_trigger_build
portal_categories/trade_phase/slapos
portal_categories/trade_phase/slapos/**
portal_deliveries/slapos_sale_packing_list_builder
......
873
\ No newline at end of file
874
\ No newline at end of file
......@@ -11,6 +11,5 @@ portal_alarms/vifib_lock_person
portal_alarms/vifib_lock_software_instance
portal_alarms/vifib_request_destruction_selenium_tester_instance
portal_alarms/vifib_set_priority_one_message_table
portal_alarms/vifib_trigger_build
portal_alarms/vifib_unlock_person
portal_alarms/vifib_unlock_software_instance
\ No newline at end of file
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