Commit 1f94f3bf authored by Yusei Tahara's avatar Yusei Tahara

Use SQLQueue. Multiple documents may need the same solver at the same time.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39862 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 745cb2bb
...@@ -183,7 +183,9 @@ class SolverProcess(XMLObject, ActiveProcess): ...@@ -183,7 +183,9 @@ class SolverProcess(XMLObject, ActiveProcess):
for solver in self.contentValues(portal_type=self.getPortalObject().getPortalTargetSolverTypeList()): for solver in self.contentValues(portal_type=self.getPortalObject().getPortalTargetSolverTypeList()):
if solver.isTempObject(): if solver.isTempObject():
solver_type = solver.getPortalTypeValue() solver_type = solver.getPortalTypeValue()
solver_type.activate(activate_kw=activate_kw).solve( # Since multiple documents may need the same solver, activity must be
# executed individually. Thus SQLQueue is needed.
solver_type.activate(activity='SQLQueue', activate_kw=activate_kw).solve(
activate_kw=activate_kw, activate_kw=activate_kw,
delivery_list=solver.getDeliveryList(), delivery_list=solver.getDeliveryList(),
configuration_dict=solver.getConfigurationPropertyDict() configuration_dict=solver.getConfigurationPropertyDict()
...@@ -191,7 +193,8 @@ class SolverProcess(XMLObject, ActiveProcess): ...@@ -191,7 +193,8 @@ class SolverProcess(XMLObject, ActiveProcess):
else: else:
if isTransitionPossible(solver, 'start_solving'): if isTransitionPossible(solver, 'start_solving'):
solver.startSolving() solver.startSolving()
solver.activate(active_process=self, activate_kw=activate_kw).solve( # SQLQueue is needed for the same reason.
solver.activate(activity='SQLQueue', active_process=self, activate_kw=activate_kw).solve(
activate_kw=activate_kw) activate_kw=activate_kw)
# API # API
......
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