Commit 148d693f authored by Sebastien Robin's avatar Sebastien Robin

- do not specify the date when looking for duplicates into

  SQLDict, we can select messages with any date if there
  are already validated
- delete duplicate messages into sqldict even if the tag
  are different betweend them, like it was working previously


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17792 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ae238877
...@@ -181,10 +181,9 @@ class SQLDict(RAMDict, SQLBase): ...@@ -181,10 +181,9 @@ class SQLDict(RAMDict, SQLBase):
""" """
activity_tool.SQLDict_deleteDuplicatedMessageList( activity_tool.SQLDict_deleteDuplicatedMessageList(
processing_node=processing_node, uid=line.uid, processing_node=processing_node, uid=line.uid,
to_date=line.date, path=line.path, method_id=line.method_id, path=line.path, method_id=line.method_id,
group_method_id=line.group_method_id, group_method_id=line.group_method_id,
order_validation_text=line.order_validation_text, order_validation_text=line.order_validation_text)
tag=line.tag)
def getProcessableMessageList(self, activity_tool, processing_node): def getProcessableMessageList(self, activity_tool, processing_node):
""" """
......
...@@ -10,23 +10,19 @@ class_file: ...@@ -10,23 +10,19 @@ class_file:
<params> <params>
processing_node processing_node
uid uid
to_date
path path
method_id method_id
group_method_id group_method_id
order_validation_text order_validation_text
tag
</params> </params>
DELETE FROM DELETE FROM
message message
WHERE WHERE
processing_node IN (0, <dtml-sqlvar processing_node type="int">) processing_node IN (0, <dtml-sqlvar processing_node type="int">)
AND uid != <dtml-sqlvar uid type="int"> AND uid != <dtml-sqlvar uid type="int">
AND date <= <dtml-sqlvar to_date type="datetime">
AND path = <dtml-sqlvar path type="string"> AND path = <dtml-sqlvar path type="string">
AND method_id = <dtml-sqlvar method_id type="string"> AND method_id = <dtml-sqlvar method_id type="string">
AND group_method_id = <dtml-sqlvar group_method_id type="string"> AND group_method_id = <dtml-sqlvar group_method_id type="string">
AND order_validation_text = <dtml-sqlvar order_validation_text type="string"> AND order_validation_text = <dtml-sqlvar order_validation_text type="string">
AND tag IN ('', <dtml-sqlvar tag type="string">)
<dtml-var sql_delimiter> <dtml-var sql_delimiter>
COMMIT COMMIT
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