@task
def render_document_chunk(pks, cache_control='no-cache', base_url=None, force=False):
 logger = render_document_chunk.get_logger()
 logger.info((u'Starting to render document chunk: %s' % ','.join([str(pk) for pk in pks])))
 base_url = (base_url or settings.SITE_URL)
 for pk in pks:
  result = render_document(pk, cache_control, base_url, force=force)
  if result:
   logger.error((u'Error while rendering document %s with error: %s' % (pk, result)))
 logger.info(u'Finished rendering of document chunk')

@ task def render_document_chunk ( pks , cache_control = 'no-cache' , base_url = None , force = False ) : logger = render_document_chunk . get_logger ( ) logger . info ( ( u'Starting to render document chunk: %s' % ',' . join ( [ str ( pk ) for pk in pks ] ) ) ) base_url = ( base_url or settings . SITE_URL ) for pk in pks : result = render_document ( pk , cache_control , base_url , force = force ) if result : logger . error ( ( u'Error while rendering document %s with error: %s' % ( pk , result ) ) ) logger . info ( u'Finished rendering of document chunk' )
simple task to render a chunk of documents instead of one per each .