# HG changeset patch # User Lennard de Rijk # Date 1254247914 -7200 # Node ID e412510746dcc8945944b66b9ab55ba1a5b02617 # Parent c860b26481be06ee3d27ff42ad8784f524ef88fe Removed the debug logging line from the Task decorator. Also make use of the next_start_key as name for the new starting key. diff -r c860b26481be -r e412510746dc app/soc/tasks/helper/decorators.py --- 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})