<dtml-comment>
title:
connection_id:cmf_activity_sql_connection
max_rows:1
max_cache:0
cache_time:0
class_name:
class_file:
</dtml-comment>
<params>delay
processing_node
retry</params>
UPDATE
  message
SET
  date = DATE_SUB(date, INTERVAL <dtml-sqlvar delay type="int"> SECOND),
  processing_date = DATE_SUB(processing_date, INTERVAL <dtml-sqlvar delay type="int"> SECOND)
<dtml-if retry>
  ,retry = GREATEST(retry,<dtml-sqlvar retry type="int">) - <dtml-sqlvar retry type="int">
</dtml-if> 
WHERE
  1 = 1
<dtml-if expr="processing_node is not None">
  AND processing_node = <dtml-sqlvar processing_node type="int">
</dtml-if>
