@task(rate_limit='3/h')
@timeit
def rebuild_kb():
 cache.delete(settings.WIKI_REBUILD_TOKEN)
 d = Document.objects.using('default').filter(current_revision__isnull=False).values_list('id', flat=True)
 for chunk in chunked(d, 50):
  _rebuild_kb_chunk.apply_async(args=[chunk])

@ task ( rate_limit = '3/h' ) @ timeit def rebuild_kb ( ) : cache . delete ( settings . WIKI_REBUILD_TOKEN ) d = Document . objects . using ( 'default' ) . filter ( current_revision__isnull = False ) . values_list ( 'id' , flat = True ) for chunk in chunked ( d , 50 ) : _rebuild_kb_chunk . apply_async ( args = [ chunk ] )
re-render all documents in the kb in chunks .