Removed the debug logging line from the Task decorator.
Also make use of the next_start_key as name for the new starting key.
--- a/app/soc/tasks/helper/decorators.py Tue Sep 29 20:10:08 2009 +0200
+++ b/app/soc/tasks/helper/decorators.py Tue Sep 29 20:11:54 2009 +0200
@@ -93,7 +93,7 @@
if 'json' in post_dict:
json = post_dict['json']
- entities, start_key = logic.getBatchOfData(filter, order, start_key)
+ entities, next_start_key = logic.getBatchOfData(filter, order, start_key)
try:
new_json = func(request, entities=entities, json=json, *args, **kwargs)
@@ -104,15 +104,13 @@
logging.error(exception)
return task_responses.repeatTask()
- if start_key is None:
- logging.debug('Task sucessfully completed')
- else:
+ if next_start_key:
context = post_dict.copy()
if 'json' in context:
del context['json']
- context.update({'start_key': start_key})
+ context.update({'start_key': next_start_key})
if new_json is not None:
context.update({'json': new_json})