Commit b56732d6 authored by Jean-Paul Smets's avatar Jean-Paul Smets

more fixes


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@326 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent da07701c
...@@ -123,8 +123,18 @@ class ActiveWrapper: ...@@ -123,8 +123,18 @@ class ActiveWrapper:
class ActivityTool (Folder, UniqueObject): class ActivityTool (Folder, UniqueObject):
""" """
This is a ZSQLCatalog that filters catalog queries. ActivityTool is the central point for activity management.
It is based on ZSQLCatalog
Improvement to consider to reduce locks:
Idea 1: create an SQL tool which accumulate queries and executes them at the end of a transaction,
thus allowing all SQL transaction to happen in a very short time
(this would also be a great way of using MyISAM tables)
Idea 2: do the same at the level of ActivityTool
Idea 3: do the same at the level of each activity (ie. queueMessage
accumulates and fires messages at the end of the transactino)
""" """
id = 'portal_activities' id = 'portal_activities'
meta_type = 'CMF Activity Tool' meta_type = 'CMF Activity Tool'
......
...@@ -8,8 +8,12 @@ class_name: ...@@ -8,8 +8,12 @@ class_name:
class_file: class_file:
</dtml-comment> </dtml-comment>
<params>path <params>path
processing_node</params> processing_node
method_id</params>
UPDATE message UPDATE message
SET processing_node=<dtml-sqlvar processing_node type="int"> SET
processing_node=<dtml-sqlvar processing_node type="int">,
processing=0
WHERE WHERE
path = <dtml-sqlvar path type="string"> path = <dtml-sqlvar path type="string">
<dtml-if method_id>AND method_id = <dtml-sqlvar method_id type="string"></dtml-if>
\ No newline at end of file
...@@ -11,7 +11,7 @@ class_file: ...@@ -11,7 +11,7 @@ class_file:
SELECT * FROM SELECT * FROM
message message
WHERE WHERE
processing = 1 processing = 0
<dtml-if processing_node> <dtml-if processing_node>
AND processing_node = <dtml-sqlvar processing_node type="int"> AND processing_node = <dtml-sqlvar processing_node type="int">
</dtml-if> </dtml-if>
\ No newline at end of file
...@@ -13,7 +13,7 @@ processing_node</params> ...@@ -13,7 +13,7 @@ processing_node</params>
SELECT * FROM SELECT * FROM
message message
WHERE WHERE
processing = 1 processing = 0
<dtml-if processing_node>AND processing_node = <dtml-sqlvar processing_node type="int"> </dtml-if> <dtml-if processing_node>AND processing_node = <dtml-sqlvar processing_node type="int"> </dtml-if>
<dtml-if path>AND path = <dtml-sqlvar path type="string"></dtml-if> <dtml-if path>AND path = <dtml-sqlvar path type="string"></dtml-if>
<dtml-if method_id>AND method_id = <dtml-sqlvar method_id type="string"></dtml-if> <dtml-if method_id>AND method_id = <dtml-sqlvar method_id type="string"></dtml-if>
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