Commit f2aa05e9 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

erp5_syncml: invoke callback method by activity in non split_indexation case...

erp5_syncml: invoke callback method by activity in non split_indexation case as well to make transaction shorter.
parent 81da8bd5
...@@ -137,11 +137,11 @@ class SyncMLSubscription(XMLObject): ...@@ -137,11 +137,11 @@ class SyncMLSubscription(XMLObject):
result_count = len(r_list) result_count = len(r_list)
if result_count: if result_count:
r = [str(x.path) for x in r_list] r = [str(x.path) for x in r_list]
callback_method = getattr(self.activate(**activate_kw), callback)
if not limit: if not limit:
# We do not split in activity so call the callback right now # We do not split in activity so call the callback right now
syncml_logger.info("getAndIndex : got %d result and no limit, calling callback...", syncml_logger.info("getAndIndex : got %d result and no limit, calling callback...",
result_count) result_count)
callback_method = getattr(self, callback)
callback_method(path_list=r[:], callback_method(path_list=r[:],
activate_kw=activate_kw, activate_kw=activate_kw,
**method_kw) **method_kw)
...@@ -159,8 +159,6 @@ class SyncMLSubscription(XMLObject): ...@@ -159,8 +159,6 @@ class SyncMLSubscription(XMLObject):
callback, method_kw, activate_kw, **kw) callback, method_kw, activate_kw, **kw)
generated_other_activity = True generated_other_activity = True
activate = self.activate
callback_method = getattr(activate(**activate_kw), callback)
if generated_other_activity: if generated_other_activity:
for i in range(0, result_count, packet_size): for i in range(0, result_count, packet_size):
syncml_logger.info("-- getAndIndex : recursive call, generating for %s", syncml_logger.info("-- getAndIndex : recursive call, generating for %s",
......
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