def create_subtasks(task, qs, chunk_size, *args):
 ts = [task.subtask(args=((chunk,) + args)) for chunk in chunked(qs, chunk_size)]
 TaskSet(ts).apply_async()

def create_subtasks ( task , qs , chunk_size , * args ) : ts = [ task . subtask ( args = ( ( chunk , ) + args ) ) for chunk in chunked ( qs , chunk_size ) ] TaskSet ( ts ) . apply_async ( )
splits a task depending on a queryset into a bunch of subtasks of the specified chunk_size .