'Creates the fanout task for the given activities and feed classes
followers
It takes the following ids and distributes them per fanout_chunk_size
into smaller tasks
:param follower_ids: specify the list of followers
:param feed_class: the feed classes to run the operation on
:param operation: the operation function applied to all follower feeds
:param operation_kwargs: kwargs passed to the operation
:param fanout_priority: the priority set to this fanout'

def create_fanout_tasks(self, follower_ids, feed_class, operation, operation_kwargs=None, fanout_priority=None):

    fanout_task = self.get_fanout_task(fanout_priority, feed_class=feed_class)
    if (not fanout_task):
        return []
    chunk_size = self.fanout_chunk_size
    user_ids_chunks = list(chunks(follower_ids, chunk_size))
    msg_format = 'spawning    %s    subtasks    for    %s    user    ids    in    chunks    of    %s    users'
    logger.info(msg_format, len(user_ids_chunks), len(follower_ids), chunk_size)
    tasks = []
    for ids_chunk in user_ids_chunks:
        task = fanout_task.delay(feed_manager=self, feed_class=feed_class, user_ids=ids_chunk, operation=operation, operation_kwargs=operation_kwargs)
        tasks.append(task)
    return tasks
