Commit 2f1d0501 authored by Łukasz Nowak's avatar Łukasz Nowak

Paralerize build a bit.

parent bac1cf55
......@@ -59,7 +59,6 @@ select_dict= {\'delivery_uid\': None}\n
kw.update(\n
portal_type=\'Simulation Movement\',\n
sort_on=((\'uid\', \'ASC\'),),\n
uid=\'> %s\' % uid,\n
limit=69,\n
select_dict=select_dict,\n
left_join_list=select_dict.keys(),\n
......@@ -67,11 +66,18 @@ kw.update(\n
group_by=(\'uid\',),\n
**{\'movement.destination_uid\': person_uid}\n
)\n
movement_list = context.portal_catalog(**kw)\n
\n
if len(movement_list) > 0:\n
context.VifibSaleInvoiceBuilder_buildAndPlan(context.getPortalObject().portal_deliveries.vifib_sale_invoice_builder, movement_list=movement_list)\n
context.activate().Person_buildAndPlanInvoice(movement_list[-1].getUid())\n
tag = \'Wrapper_%s\' % context.getUid()\n
for i in range(1, 4):\n
movement_list = context.portal_catalog(uid=\'>%s\' % uid, **kw)\n
if len(movement_list) > 0:\n
context.activate(activity=\'SQLQueue\', tag=tag).WrapperVifibSaleInvoiceBuilder_buildAndPlan(\'portal_deliveries/vifib_sale_invoice_builder\', [q.getRelativeUrl() for q in movement_list])\n
uid = movement_list[-1].getUid()\n
else:\n
break\n
\n
if len(movement_list) > 0: \n
context.activate(after_tag=tag).Person_buildAndPlanInvoice(movement_list[-1].getUid())\n
]]></string> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context.VifibSaleInvoiceBuilder_buildAndPlan(context.restrictedTraverse(builder_path), movement_list=[context.restrictedTraverse(m) for m in movement_path_list])\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>builder_path, movement_path_list</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WrapperVifibSaleInvoiceBuilder_buildAndPlan</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
61
\ No newline at end of file
62
\ 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