Commit 5e93ab86 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Fix a bug in broadcasting.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2307 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6a9d16cd
......@@ -295,14 +295,15 @@ class SQLDict(RAMDict):
# Broadcast messages must be distributed into all nodes.
uid = line.uid
activity_tool.SQLDict_assignMessage(processing_node=1, uid=[uid])
for node in range(2, node_count+1):
activity_tool.SQLDict_writeMessage( path = path,
method_id = line.method_id,
priority = line.priority,
broadcast = 1,
processing_node = node,
message = line.message,
date = line.date)
if node_count > 1:
for node in range(2, node_count+1):
activity_tool.SQLDict_writeMessage( path = path,
method_id = line.method_id,
priority = line.priority,
broadcast = 1,
processing_node = node,
message = line.message,
date = line.date)
elif not path_dict.has_key(path):
# Only assign once (it would be different for a queue)
path_dict[path] = 1
......
......@@ -220,14 +220,15 @@ class SQLQueue(RAMQueue):
if broadcast:
# Broadcast messages must be distributed into all nodes.
activity_tool.SQLQueue_assignMessage(processing_node=1, uid=uid)
for node in range(2, node_count+1):
activity_tool.SQLQueue_writeMessage( path = line.path,
method_id = line.method_id,
priority = line.priority,
broadcast = 1,
processing_node = node,
message = line.message,
date = line.date)
if node_count > 1:
for node in range(2, node_count+1):
activity_tool.SQLQueue_writeMessage( path = line.path,
method_id = line.method_id,
priority = line.priority,
broadcast = 1,
processing_node = node,
message = line.message,
date = line.date)
else:
#LOG("distribute", 0, "assign %s" % uid)
activity_tool.SQLQueue_assignMessage(uid=uid, processing_node=processing_node)
......
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