Commit c384cc52 authored by Yoshinori Okuji's avatar Yoshinori Okuji

log error info.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2292 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 58a0ca05
...@@ -64,7 +64,7 @@ def registerActivity(activity): ...@@ -64,7 +64,7 @@ def registerActivity(activity):
activity_dict[activity.__name__] = activity_instance activity_dict[activity.__name__] = activity_instance
class Message: class Message:
def __init__(self, object, active_process, activity_kw, method_id, args, kw): def __init__(self, object, active_process, activity_kw, method_id, args, kw):
if type(object) is type('a'): if type(object) is type('a'):
self.object_path = object.split('/') self.object_path = object.split('/')
...@@ -204,7 +204,7 @@ class ActivityTool (Folder, UniqueObject): ...@@ -204,7 +204,7 @@ class ActivityTool (Folder, UniqueObject):
def __init__(self): def __init__(self):
return Folder.__init__(self, ActivityTool.id) return Folder.__init__(self, ActivityTool.id)
# Filter content (ZMI)) # Filter content (ZMI))
def filtered_meta_types(self, user=None): def filtered_meta_types(self, user=None):
# Filters the list of available meta types. # Filters the list of available meta types.
...@@ -236,7 +236,7 @@ class ActivityTool (Folder, UniqueObject): ...@@ -236,7 +236,7 @@ class ActivityTool (Folder, UniqueObject):
try: try:
activity.distribute(self, node_count) activity.distribute(self, node_count)
except: except:
LOG('CMFActivity:', 100, 'Core call to distribute failed for activity %s' % activity) LOG('CMFActivity:', 100, 'Core call to distribute failed for activity %s' % activity, error=sys.exc_info())
security.declarePublic('tic') security.declarePublic('tic')
def tic(self, processing_node=1, force=0): def tic(self, processing_node=1, force=0):
...@@ -304,10 +304,10 @@ class ActivityTool (Folder, UniqueObject): ...@@ -304,10 +304,10 @@ class ActivityTool (Folder, UniqueObject):
def deferredQueueMessage(self, activity, message): def deferredQueueMessage(self, activity, message):
self._v_activity_buffer.deferredQueueMessage(self, activity, message) self._v_activity_buffer.deferredQueueMessage(self, activity, message)
def deferredDeleteMessage(self, activity, message): def deferredDeleteMessage(self, activity, message):
self._v_activity_buffer.deferredDeleteMessage(self, activity, message) self._v_activity_buffer.deferredDeleteMessage(self, activity, message)
def getRegisteredMessageList(self, activity): def getRegisteredMessageList(self, activity):
activity_buffer = getattr(self, '_v_activity_buffer', None) activity_buffer = getattr(self, '_v_activity_buffer', None)
#if getattr(self, '_v_activity_buffer', None): #if getattr(self, '_v_activity_buffer', None):
...@@ -316,11 +316,11 @@ class ActivityTool (Folder, UniqueObject): ...@@ -316,11 +316,11 @@ class ActivityTool (Folder, UniqueObject):
return activity.getRegisteredMessageList(self._v_activity_buffer, self) return activity.getRegisteredMessageList(self._v_activity_buffer, self)
else: else:
return [] return []
def unregisterMessage(self, activity, message): def unregisterMessage(self, activity, message):
self._v_activity_buffer._register() # Required if called by flush, outside activate self._v_activity_buffer._register() # Required if called by flush, outside activate
return activity.unregisterMessage(self._v_activity_buffer, self, message) return activity.unregisterMessage(self._v_activity_buffer, self, message)
def flush(self, object, invoke=0, **kw): def flush(self, object, invoke=0, **kw):
global is_initialized global is_initialized
if not is_initialized: self.initialize() if not is_initialized: self.initialize()
...@@ -423,11 +423,11 @@ class ActivityTool (Folder, UniqueObject): ...@@ -423,11 +423,11 @@ class ActivityTool (Folder, UniqueObject):
return 1 return 1
return 0 return 0
# Required for tests (time shift) # Required for tests (time shift)
def timeShift(self, delay): def timeShift(self, delay):
global is_initialized global is_initialized
if not is_initialized: self.initialize() if not is_initialized: self.initialize()
for activity in activity_list: for activity in activity_list:
activity.timeShift(self, delay) activity.timeShift(self, delay)
InitializeClass(ActivityTool) InitializeClass(ActivityTool)
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