'Register a task in the task registry.
The task will be automatically instantiated if not already an
instance. Name must be configured prior to registration.'

def register(self, task):

    if (task.name is None):
        raise InvalidTaskError(u'Task    class    {0!r}    must    specify    .name    attribute'.format(type(task).__name__))
    self[task.name] = ((inspect.isclass(task) and task()) or task)
