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

Improve speed.

Do small batches.

Additionally lower registration priority in order to minimise duplicates.
parent fe36320d
...@@ -54,7 +54,8 @@ ...@@ -54,7 +54,8 @@
portal.portal_catalog.searchAndActivate(\n portal.portal_catalog.searchAndActivate(\n
portal_type=\'Person\',\n portal_type=\'Person\',\n
method_id=\'Person_buildAndPlanInvoice\',\n method_id=\'Person_buildAndPlanInvoice\',\n
packet_size=1\n packet_site=1,\n
activate_kw={\'priority\': 8}\n
)\n )\n
</string> </value> </string> </value>
</item> </item>
......
...@@ -60,7 +60,7 @@ kw.update(\n ...@@ -60,7 +60,7 @@ kw.update(\n
portal_type=\'Simulation Movement\',\n portal_type=\'Simulation Movement\',\n
sort_on=((\'uid\', \'ASC\'),),\n sort_on=((\'uid\', \'ASC\'),),\n
uid=\'>= %s\' % uid,\n uid=\'>= %s\' % uid,\n
limit=1000,\n limit=69,\n
select_dict=select_dict,\n select_dict=select_dict,\n
left_join_list=select_dict.keys(),\n left_join_list=select_dict.keys(),\n
delivery_uid=None,\n delivery_uid=None,\n
...@@ -70,7 +70,7 @@ movement_list = context.portal_catalog(**kw)\n ...@@ -70,7 +70,7 @@ movement_list = context.portal_catalog(**kw)\n
\n \n
if len(movement_list) > 0:\n if len(movement_list) > 0:\n
context.VifibSaleInvoiceBuilder_buildAndPlan(context.getPortalObject().portal_deliveries.vifib_sale_invoice_builder, movement_list=movement_list)\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 context.activate(priority=8).Person_buildAndPlanInvoice(movement_list[-1].getUid())\n
]]></string> </value> ]]></string> </value>
......
56 57
\ No newline at end of file \ 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