Commit eb75efc1 authored by Alexandre Boeglin's avatar Alexandre Boeglin

If zope was stopped while activities where processed we must mark them back as

not being currently processed when starting zope, or they will be kept as
zombies in the SQL tables, blokcing other activities using after_method_id.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5658 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3bcb4bc4
...@@ -62,6 +62,13 @@ class SQLDict(RAMDict): ...@@ -62,6 +62,13 @@ class SQLDict(RAMDict):
and provide sequentiality. Should not create conflict and provide sequentiality. Should not create conflict
because use of OOBTree. because use of OOBTree.
""" """
def initialize(self, activity_tool):
if not self.is_initialized:
# If zope was stopped while activities where processed we must mark them
# as unprocessed, or they will be kept as zombies in the SQL table
activity_tool.SQLDict_clearProcessingFlag()
self.is_initialized = 1
# Transaction commit methods # Transaction commit methods
def prepareQueueMessage(self, activity_tool, m): def prepareQueueMessage(self, activity_tool, m):
if m.is_registered: if m.is_registered:
......
...@@ -58,6 +58,12 @@ class SQLQueue(RAMQueue): ...@@ -58,6 +58,12 @@ class SQLQueue(RAMQueue):
and provide sequentiality. Should not create conflict and provide sequentiality. Should not create conflict
because use of OOBTree. because use of OOBTree.
""" """
def initialize(self, activity_tool):
if not self.is_initialized:
# If zope was stopped while activities where processed we must mark them
# as unprocessed, or they will be kept as zombies in the SQL table
activity_tool.SQLQueue_clearProcessingFlag()
self.is_initialized = 1
def prepareQueueMessage(self, activity_tool, m): def prepareQueueMessage(self, activity_tool, m):
if m.is_registered: if m.is_registered:
......
<dtml-comment>
title:
connection_id:cmf_activity_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_file:
</dtml-comment>
<params></params>
UPDATE
message
SET
processing="0"
WHERE
processing="1"
<dtml-comment>
title:
connection_id:cmf_activity_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_file:
</dtml-comment>
<params></params>
UPDATE
message_queue
SET
processing="0"
WHERE
processing="1"
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