Commit 31afbf6c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

remove needless activity dependencies that can cause infinite dependency loop.

parent 6731ccd8
...@@ -71,14 +71,8 @@ class SyncMLPublication(SyncMLSubscription): ...@@ -71,14 +71,8 @@ class SyncMLPublication(SyncMLSubscription):
""" """
Reset all subscribers Reset all subscribers
""" """
id_list = []
for subscriber in self.contentValues(portal_type='SyncML Subscription'):
subscriber.resetSignatureList()
id_list.append(subscriber.getId())
self.activate(activity='SQLQueue', self.activate(activity='SQLQueue',
tag=self.getId(), priority=ACTIVITY_PRIORITY).manage_delObjects(ids=list(self.getObjectIds()))
after_tag=id_list,
priority=ACTIVITY_PRIORITY).manage_delObjects(id_list)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getConflictList') 'getConflictList')
......
...@@ -403,7 +403,6 @@ class SyncMLSubscription(XMLObject): ...@@ -403,7 +403,6 @@ class SyncMLSubscription(XMLObject):
for i in xrange(0, object_list_len, MAX_OBJECTS): for i in xrange(0, object_list_len, MAX_OBJECTS):
current_id_list = object_id_list[i:i+MAX_OBJECTS] current_id_list = object_id_list[i:i+MAX_OBJECTS]
self.activate(activity='SQLQueue', self.activate(activity='SQLQueue',
tag=self.getId(),
priority=ACTIVITY_PRIORITY).manage_delObjects(current_id_list) priority=ACTIVITY_PRIORITY).manage_delObjects(current_id_list)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
...@@ -449,7 +448,7 @@ class SyncMLSubscription(XMLObject): ...@@ -449,7 +448,7 @@ class SyncMLSubscription(XMLObject):
'conflict_resolved_with_merge', 'conflict_resolved_with_merge',
'conflict_resolved_with_client_command_winning'): 'conflict_resolved_with_client_command_winning'):
if self.getIsActivityEnabled(): if self.getIsActivityEnabled():
signature.activate(tag=self.getId(), activity='SQLQueue', signature.activate(activity='SQLQueue',
priority=ACTIVITY_PRIORITY).reset() priority=ACTIVITY_PRIORITY).reset()
else: else:
signature.reset() signature.reset()
......
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