'Load all configured job runner plugins
:returns: list of job runner plugins'

def get_job_runner_plugins(self, handler_id):

    rval = {}
    if (handler_id in self.handler_runner_plugins):
        plugins_to_load = [rp for rp in self.runner_plugins if (rp['id'] in self.handler_runner_plugins[handler_id])]
        log.info("Handler    '%s'    will    load    specified    runner    plugins:    %s", handler_id, ',    '.join([rp['id'] for rp in plugins_to_load]))
    else:
        plugins_to_load = self.runner_plugins
        log.info("Handler    '%s'    will    load    all    configured    runner    plugins", handler_id)
    for runner in plugins_to_load:
        class_names = []
        module = None
        id = runner['id']
        load = runner['load']
        if (':' in load):
            (module_name, class_name) = load.rsplit(':', 1)
            class_names = [class_name]
            module = __import__(module_name)
        else:
            if ('.' not in load):
                module_name = ('galaxy.jobs.runners.' + load)
                try:
                    module = __import__(module_name)
                except ImportError:
                    pass
            if (module is None):
                module = __import__(load)
                module_name = load
        if (module is None):
            continue
        for comp in module_name.split('.')[1:]:
            module = getattr(module, comp)
        if (not class_names):
            try:
                assert module.__all__
                class_names = module.__all__
            except AssertionError:
                log.error(('Runner    "%s"    does    not    contain    a    list    of    exported    classes    in    __all__' % load))
                continue
        for class_name in class_names:
            runner_class = getattr(module, class_name)
            try:
                assert issubclass(runner_class, BaseJobRunner)
            except TypeError:
                log.warning(('A    non-class    name    was    found    in    __all__,    ignoring:    %s' % id))
                continue
            except AssertionError:
                log.warning(('Job    runner    classes    must    be    subclassed    from    BaseJobRunner,    %s    has    bases:    %s' % (id, runner_class.__bases__)))
                continue
            try:
                rval[id] = runner_class(self.app, runner['workers'], **runner.get('kwds', {}))
            except TypeError:
                log.exception("Job    runner    '%s:%s'    has    not    been    converted    to    a    new-style    runner    or    encountered    TypeError    on    load", module_name, class_name)
                rval[id] = runner_class(self.app)
            log.debug(("Loaded    job    runner    '%s:%s'    as    '%s'" % (module_name, class_name, id)))
    return rval
