Commit 9e31417b authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Alain Takoudjou

Another Improvement on Improve Alarm_updateOpenOrderSimulation

Support full parameter correctly.

Conflicts:
	bt5/erp5_open_trade/bt/revision

Really fix full support.

Conflicts:
	bt5/erp5_open_trade/bt/revision

Drop priority ordering.

Let the activity system chose randomly what to do.

Conflicts:
	bt5/erp5_open_trade/bt/revision
parent 03229ad9
...@@ -57,8 +57,7 @@ if params is None:\n ...@@ -57,8 +57,7 @@ if params is None:\n
params = {}\n params = {}\n
\n \n
last_active_process = context.getLastActiveProcess()\n last_active_process = context.getLastActiveProcess()\n
\n if not params.get(\'full\', False) and last_active_process is not None:\n
if last_active_process is not None and params.get(\'full\', False):\n
# fetch only objects modified since last alarm run\n # fetch only objects modified since last alarm run\n
kw[\'indexation_timestamp\'] = \'>= %s\' % last_active_process.getStartDate().ISO()\n kw[\'indexation_timestamp\'] = \'>= %s\' % last_active_process.getStartDate().ISO()\n
\n \n
...@@ -73,7 +72,7 @@ portal.portal_catalog.searchAndActivate(\n ...@@ -73,7 +72,7 @@ portal.portal_catalog.searchAndActivate(\n
method_id=\'OpenOrder_updateSimulation\',\n method_id=\'OpenOrder_updateSimulation\',\n
method_kw={\'tag\': tag},\n method_kw={\'tag\': tag},\n
packet_size=1, # As OpenOrder_updateSimulation can generate big transaction separate the calls\n packet_size=1, # As OpenOrder_updateSimulation can generate big transaction separate the calls\n
activate_kw={\'tag\':tag, \'priority\': 8},\n activate_kw={\'tag\':tag},\n
**kw # XXX: In one query put parents of last modified lines\n **kw # XXX: In one query put parents of last modified lines\n
)\n )\n
\n \n
......
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